joyce8/EMBER2024-capa huggingface dataset:
Function at 0x432055
Capabilities:
Enumerate files on windows

Disassembly:
pushal
popal
push ebp
mov ebp, esp
sub esp, 0x150
mov eax, dword [0x441018]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x10]
push edi
mov dword [ebp - 0x148], esi
jmp 0x432097
mov al, byte [ecx]
cmp al, 0x2f
je 0x43209b
cmp al, 0x5c
je 0x43209b
cmp al, 0x3a
je 0x43209b
push ecx
push ebx
call fcn.00435400
pop ecx
pop ecx
push eax
pop ecx
cmp ecx, ebx
jne 0x43207e
mov dl, byte [ecx]
cmp dl, 0x3a
jne 0x4320b9
lea eax, [ebx + 1]
cmp ecx, eax
je 0x4320b9
push esi
sub edi, edi
push edi
push edi
push ebx
call fcn.00431fbf
add esp, 0x10
jmp 0x432133
xor edi, edi
cmp dl, 0x2f
je 0x4320ce
cmp dl, 0x5c
je 0x4320ce
cmp dl, 0x3a
je 0x4320ce
mov eax, edi
jmp 0x4320d1
xor eax, eax
inc eax
movzx eax, al
sub ecx, ebx
inc ecx
neg eax
push 0x140
sbb eax, eax
and eax, ecx
mov dword [ebp - 0x14c], eax
lea eax, [ebp - 0x144]
push edi
push eax
call fcn.0042d9c0
add esp, 0xc
lea eax, [ebp - 0x144]
push edi
push edi
push edi
push eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileExA]
mov esi, eax
mov eax, dword [ebp - 0x148]
cmp esi, 0xffffffff
jne 0x432144
push eax
push edi
push edi
push ebx
call fcn.00431fbf
add esp, 0x10
mov edi, eax
cmp esi, 0xffffffff
je 0x432131
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
push edi
pop eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042d53e
push ebp
pop esp
pop ebp
ret
mov ecx, dword [eax + 4]
sub ecx, dword [eax]
sar ecx, 2
mov dword [ebp - 0x150], ecx
cmp byte [ebp - 0x118], 0x2e
jne 0x432173
mov cl, byte [ebp - 0x117]
test cl, cl
je 0x43218e
cmp cl, 0x2e
jne 0x432173
cmp byte [ebp - 0x116], 0
je 0x43218e
push eax
push dword [ebp - 0x14c]
lea eax, [ebp - 0x118]
push ebx
push eax
call fcn.00431fbf
add esp, 0x10
test eax, eax
jne 0x432123
lea eax, [ebp - 0x144]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
or eax, eax
mov eax, dword [ebp - 0x148]
jne 0x432152
mov edx, dword [eax]
mov eax, dword [eax + 4]
mov ecx, dword [ebp - 0x150]
sub eax, edx
sar eax, 2
cmp ecx, eax
je 0x432125
push 0x431e17
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.00434f60
add esp, 0x10
jmp 0x432125
Function at 0x433198
Capabilities:
Get thread local storage value

Disassembly:
push edx
pop edx
push ebp
push esp
pop ebp
push ecx
mov eax, dword [0x441018]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push str.FlsGetValue
push 0x43b34c
push str.FlsGetValue
push 5
call fcn.00432f61
add esp, 0x10
mov esi, eax
push dword [ebp + 8]
test esi, esi
je 0x4331d7
mov ecx, esi
call dword [0x43a11c]
call esi
jmp 0x4331dd
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0042d53e
push ebp
pop esp
pop ebp
ret 4

Function at 0x4331ee
Capabilities:
Set thread local storage value

Disassembly:
push edi
pop edi
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x441018]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push str.FlsSetValue
push 0x43b360
push str.FlsSetValue
push 6
call fcn.00432f61
add esp, 0x10
push eax
pop esi
push dword [ebp + 0xc]
push dword [ebp + 8]
or esi, esi
je 0x433230
push esi
pop ecx
call dword [0x43a11c]
call esi
jmp 0x433236
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0042d53e
mov esp, ebp
pop ebp
ret 8

Function at 0x433247
Capabilities:
Packed with generic packer

Disassembly:
pushal
popal
push ebp
push esp
pop ebp
push ecx
mov eax, dword [0x441018]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push str.InitializeCriticalSectionEx
push 0x43b390
push str.InitializeCriticalSectionEx
push 0x14
call fcn.00432f61
push eax
pop esi
add esp, 0x10
test esi, esi
je 0x43328c
push dword [ebp + 0x10]
mov ecx, esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [0x43a11c]
call esi
jmp 0x433298
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSectionAndSpinCount]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0042d53e
push ebp
pop esp
pop ebp
ret 0xc

Function at 0x434177
Capabilities:
Packed with generic packer

Disassembly:
pushal
popal
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x441018]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 0xc]
cmp dword [ebp + 8], esi
je 0x4341b3
add esi, 0xfffffffc
push edi
mov edi, dword [esi]
test edi, edi
je 0x4341a7
push 0
push edi
pop ecx
call dword [0x43a11c]
call edi
pop ecx
sub esi, 8
lea eax, [esi + 4]
cmp eax, dword [ebp + 8]
jne 0x434194
pop edi
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.0042d53e
push ebp
pop esp
pop ebp
ret
Function at 0x43630d
Capabilities:
Write file on windows

Disassembly:
push eax
pop eax
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x441018]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push eax
pop ecx
and eax, 0x3f
sar ecx, 6
push ebx
imul ebx, eax, 0x30
push esi
mov eax, dword [ecx*4 + 0x4423d0]
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x2c], ecx
mov eax, dword [eax + ebx + 0x18]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 0x14]
add eax, edi
mov dword [ebp - 0x24], eax
call dword [sym.imp.KERNEL32.dll_GetConsoleCP]
mov esi, dword [ebp + 8]
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x38], eax
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
cmp edi, ecx
jae 0x4364ad
mov ch, byte [edi]
sub eax, eax
mov word [ebp - 0x18], ax
mov eax, dword [ebp - 0x2c]
mov byte [ebp - 0x1b], ch
mov edx, dword [eax*4 + 0x4423d0]
mov cl, byte [edx + ebx + 0x2d]
test cl, 4
je 0x4363a7
mov al, byte [edx + ebx + 0x2e]
and cl, 0xfb
mov byte [ebp - 0xc], al
lea eax, [ebp - 0xc]
push 2
mov byte [ebp - 0xb], ch
mov byte [edx + ebx + 0x2d], cl
push eax
jmp 0x4363e1
call fcn.004338e6
movzx ecx, byte [edi]
mov edx, 0x8000
test word [eax + ecx*2], dx
je 0x4363de
cmp edi, dword [ebp - 0x24]
jae 0x436484
push 2
lea eax, [ebp - 0x18]
push edi
push eax
call fcn.00434bd4
add esp, 0xc
cmp eax, 0xffffffff
je 0x4364ad
inc edi
jmp 0x4363f6
push 1
push edi
lea eax, [ebp - 0x18]
push eax
call fcn.00434bd4
add esp, 0xc
cmp eax, 0xffffffff
je 0x4364ad
xor ecx, ecx
lea eax, [ebp - 0x14]
push ecx
push ecx
push 5
push eax
push 1
lea eax, [ebp - 0x18]
inc edi
push eax
push ecx
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 0x34], eax
or eax, eax
je 0x4364ad
push 0
lea ecx, [ebp - 0x20]
push ecx
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_WriteFile]
or eax, eax
je 0x4364a5
mov eax, dword [esi + 8]
sub eax, dword [ebp - 0x30]
add eax, edi
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x34]
cmp dword [ebp - 0x20], eax
jb 0x4364ad
cmp byte [ebp - 0x1b], 0xa
jne 0x436479
push 0xd
pop eax
push 0
mov word [ebp - 0x1c], ax
lea eax, [ebp - 0x20]
push eax
push 1
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4364a5
cmp dword [ebp - 0x20], 1
jb 0x4364ad
inc dword [esi + 8]
inc dword [esi + 4]
cmp edi, dword [ebp - 0x24]
jb 0x436370
jmp 0x4364ad
mov edx, dword [ebp - 0x2c]
mov al, byte [edi]
mov ecx, dword [edx*4 + 0x4423d0]
mov byte [ecx + ebx + 0x2e], al
mov eax, dword [edx*4 + 0x4423d0]
or byte [eax + ebx + 0x2d], 4
inc dword [esi + 4]
jmp 0x4364ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi], eax
mov ecx, dword [ebp - 4]
push esi
pop eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042d53e
mov esp, ebp
pop ebp
ret
Function at 0x436682
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x1410
call fcn.00438e30
mov eax, dword [0x441018]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
push ecx
pop eax
sar eax, 6
and ecx, 0x3f
imul ecx, ecx, 0x30
push ebx
mov ebx, dword [ebp + 0x10]
mov eax, dword [eax*4 + 0x4423d0]
push esi
mov esi, dword [ebp + 8]
push edi
mov ecx, dword [eax + ecx + 0x18]
mov eax, dword [ebp + 0x14]
add eax, ebx
mov dword [ebp - 0x1410], ecx
xor edx, edx
mov dword [ebp - 0x1408], eax
mov dword [esi], edx
mov dword [esi + 4], edx
mov dword [esi + 8], edx
jmp 0x43674f
lea edi, [ebp - 0x1404]
cmp ebx, eax
jae 0x43670f
movzx eax, word [ebx]
add ebx, 2
cmp eax, 0xa
jne 0x4366fc
add dword [esi + 8], 2
push 0xd
pop edx
mov word [edi], dx
add edi, 2
mov word [edi], ax
lea eax, [ebp - 6]
add edi, 2
cmp edi, eax
mov eax, dword [ebp - 0x1408]
jb 0x4366e0
lea eax, [ebp - 0x1404]
sub edi, eax
lea eax, [ebp - 0x140c]
push 0
push eax
and edi, 0xfffffffe
lea eax, [ebp - 0x1404]
push edi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
or eax, eax
je 0x436755
mov eax, dword [ebp - 0x140c]
add dword [esi + 4], eax
cmp eax, edi
jb 0x43675d
mov eax, dword [ebp - 0x1408]
mov ecx, dword [ebp - 0x1410]
cmp ebx, eax
jb 0x4366da
jmp 0x43675d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi], eax
mov ecx, dword [ebp - 4]
push esi
pop eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042d53e
mov esp, ebp
pop ebp
ret
Function at 0x438960
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
push esp
pop ebp
mov eax, dword [ebp + 8]
sub edx, edx
push ebx
push esi
push edi
mov ecx, dword [eax + 0x3c]
add ecx, eax
movzx eax, word [ecx + 0x14]
movzx ebx, word [ecx + 6]
add eax, 0x18
add eax, ecx
test ebx, ebx
je 0x43899c
mov edi, dword [ebp + 0xc]
mov esi, dword [eax + 0xc]
cmp edi, esi
jb 0x438994
mov ecx, dword [eax + 8]
add ecx, esi
cmp edi, ecx
jb 0x43899e
inc edx
add eax, 0x28
cmp edx, ebx
jb 0x438984
sub eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x438a70
Capabilities:
Parse pe header

Disassembly:
push ebp
push esp
pop ebp
mov ecx, dword [ebp + 8]
mov eax, 0x5a4d
cmp word [ecx], ax
jne 0x438a9f
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x438a9f
mov ecx, 0x10b
cmp word [eax + 0x18], cx
jne 0x438a9f
pushfd
xor eax, eax
inc eax
popfd
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x405ef4
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x422a34], 0
push esi
jne 0x405f2b
xor ecx, ecx
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
neg dl
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x405f05
mov dword [ecx*4 + 0x422a30], eax
inc ecx
cmp ecx, 0x100
jl 0x405f00
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x405f5c
mov ecx, dword [esp + 0xc]
push edi
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x422a30]
xor eax, esi
inc ecx
dec edx
jne 0x405f3e
pop edi
not eax
pop esi
ret 0xc

Function at 0x40193e
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov eax, dword [esp + 8]
mov dword [0x4040d0], eax
xor eax, eax
mov ebp, esp
mov ecx, 0xa
push eax
dec ecx
jne 0x401951
push esp
mov dword [ebp - 0x24], 0x4016b5
mov eax, dword [0x4040d0]
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], str.solienty
call dword [sym.imp.USER32.dll_RegisterClassA]
xor eax, eax
push eax
push dword [0x4040d0]
push eax
push eax
push 0x190
push 0x2b2
push 0x640
push 0x9c4
push 0
push str.absent
push str.solienty
push eax
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov dword [0x4040d8], eax
push 0
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
xor eax, eax
push eax
push eax
push eax
lea edx, [ebp - 0x1c]
push edx
call dword [sym.imp.USER32.dll_GetMessageA]
test eax, eax
je 0x4019f0
mov esi, dword [sym.imp.USER32.dll_TranslateMessage]
mov edi, dword [sym.imp.USER32.dll_DispatchMessageA]
lea eax, [ebp - 0x1c]
push eax
call esi
lea ecx, [ebp - 0x1c]
push ecx
call edi
xor eax, eax
push eax
push eax
push eax
lea edx, [ebp - 0x1c]
push edx
call dword [sym.imp.USER32.dll_GetMessageA]
test eax, eax
jne 0x4019d1
pop ebp
ret 0x10
Function at 0x405b90
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebx
mov ecx, dword [0x40a798]
mov edx, dword [esp + 0xc]
push esi
mov eax, edx
dec edx
test eax, eax
je 0x405bc5
mov esi, dword [esp + 0xc]
mov al, byte [esi]
xor ebx, ebx
xor al, cl
inc esi
shr ecx, 8
mov bl, al
mov eax, dword [ebx*4 + 0x4155d0]
xor eax, ecx
mov ecx, eax
mov eax, edx
dec edx
test eax, eax
jne 0x405ba7
pop esi
mov dword [0x40a798], ecx
pop ebx
ret

Function at 0x406682
Capabilities:
Terminate process

Disassembly:
mov dword [0x415c4c], 1
cmp dword [esp + 8], 0
push ebx
push esi
mov ebx, dword [esp + 0x14]
mov byte [0x415c48], bl
jne 0x4066de
cmp dword [0x413478], 0
je 0x4066cc
mov esi, dword [0x413470]
sub esi, 4
cmp dword [0x413478], esi
ja 0x4066cc
mov eax, dword [esi]
test eax, eax
je 0x4066c1
call eax
sub esi, 4
cmp dword [0x413478], esi
jbe 0x4066b9
push 0x4166cc
push 0x4166c8
call fcn.00406701
add esp, 8
push 0x4166d4
push 0x4166d0
call fcn.00406701
add esp, 8
test ebx, ebx
jne 0x4066fe
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebx
ret
Function at 0x40356c
Capabilities:
Terminate process

Disassembly:
jmp 0x455ed4
push 0x17
call dword [sym.imp.KERNEL32.dll_IsProcessorFeaturePresent]
test eax, eax
je 0x455ee5
push 5
pop ecx
int 0x29
push esi
push 1
mov esi, 0xc0000417
push esi
push 2
call fcn.004057e5
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
pop esi
ret

Function at 0x403689
Capabilities:
Query environment variable

Disassembly:
jmp 0x49e961
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x49e972
pop esi
ret
push ebx
push edi
push esi
call fcn.0049e848
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.00403f26
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x49e99a
push ebx
push esi
push edi
call fcn.004055dd
add esp, 0xc
push 0
call fcn.004060f5
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x40569b
Capabilities:
Parse pe header

Disassembly:
jmp 0x444fe0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x44501f
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x44501f
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x44501f
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x44501f
cmp dword [ecx + 0x74], 0xe
jbe 0x44501f
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x442e87
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
call fcn.004036e8
push 2
lea ecx, [ebp - 4]
push ecx
mov eax, dword [eax + 0x14]
push 0x22
push eax
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
movzx eax, word [ebp - 4]
sub eax, 0x30
je 0x442ec6
sub eax, 1
je 0x442ec1
sub eax, 1
je 0x442ebd
xor eax, eax
leave
ret
push 3
jmp 0x442ec8
xor eax, eax
inc eax
leave
ret
push 2
pop eax
leave
ret

Function at 0x48973a
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x489779
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x489779
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x489779
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x489779
cmp dword [ecx + 0x74], 0xe
jbe 0x489779
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x4987f3
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00401d6b
mov eax, dword [0x4cf040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x100c], eax
call fcn.00405d1c
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x498835
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x498991
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.00405e6b
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1018], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0x4d2968]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.00403210
mov ecx, dword [esi*4 + 0x4d2968]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [ecx + edi + 0x20]
jne 0x49898a
cmp eax, dword [ecx + edi + 0x24]
jne 0x49898a
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [ecx + edi + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x49898a
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00403210
add esp, 0x14
test edx, edx
jl 0x49898a
jg 0x498900
test eax, eax
jb 0x49898a
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x49898a
jl 0x49891a
cmp dword [ebp - 0x1008], eax
ja 0x49898a
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x498938
test ebx, ebx
je 0x498971
cmp ecx, edi
jae 0x498971
mov al, byte [ecx]
cmp al, 0xd
jne 0x498952
lea eax, [edi - 1]
cmp ecx, eax
jae 0x49895e
cmp byte [ecx + 1], 0xa
jne 0x49895e
inc ecx
jmp 0x49895e
movzx eax, al
movsx eax, byte [eax + 0x4cf388]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x498938
cmp edx, ebx
jne 0x498938
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x49898f
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.00402ff4
leave
ret
Function at 0x4990d0
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x4d2968]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x499110
cmp byte [ebx], 0xa
jne 0x499110
or byte [edi + eax + 0x28], 4
jmp 0x499115
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x499214
mov dl, byte [eax]
cmp dl, 0x1a
je 0x4991f7
inc eax
cmp dl, 0xd
je 0x499141
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x499167
cmp eax, ecx
jae 0x499175
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x499129
jmp 0x499214
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4991f2
cmp dword [ebp - 0x10], 0
je 0x4991f2
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x4d2968]
test byte [eax + edi + 0x28], 0x48
je 0x4991cc
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x4991b7
mov byte [esi], dl
jmp 0x4991c8
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x4d2968]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x499214
cmp byte [ebp - 1], 0xa
jne 0x4991db
cmp esi, ebx
jne 0x4991db
mov byte [esi], 0xa
jmp 0x499213
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00401915
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x499214
mov byte [esi], 0xd
jmp 0x499213
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x4d2968]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x499211
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x499214
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x499270
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x4d2968]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x4992b6
cmp word [ebx], dx
jne 0x4992b6
or byte [eax + edi + 0x28], 4
jmp 0x4992bb
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x49941e
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x4993fe
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x4992fc
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x499332
cmp eax, edx
jae 0x499340
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x4992d7
jmp 0x49941e
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4993f9
cmp dword [ebp - 0x18], 0
je 0x4993f9
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x4d2968]
test byte [eax + edi + 0x28], 0x48
je 0x4993cf
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x499393
mov word [esi], cx
jmp 0x4993ca
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x4d2968]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x4d2968]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x4d2968]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x49941e
pop eax
cmp word [ebp - 4], ax
jne 0x4993df
cmp esi, ebx
jne 0x4993df
mov word [esi], ax
jmp 0x49941b
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00401915
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x49941e
push 0xd
pop eax
jmp 0x4993da
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x4d2968]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x499418
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x49941e
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret