joyce8/EMBER2024-capa huggingface dataset:
Function at 0x44d750
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x11c
push esi
push edi
lea edi, [ebp - 0x11c]
mov ecx, 0x47
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov eax, dword [0x4c83a4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push eax
call fcn.00496f00
add esp, 4
mov dword [ebp - 0x114], eax
mov ecx, 1
imul edx, ecx, 0
mov dword [ebp - 0x118], edx
cmp dword [ebp - 0x118], 0x104
jae 0x44d7a5
jmp 0x44d7aa
call fcn.0048588f
mov eax, dword [ebp - 0x118]
mov byte [ebp + eax - 0x10c], 0
cmp dword [ebp - 0x114], 0
je 0x44d7e3
mov esi, esp
push 0x104
lea ecx, [ebp - 0x10c]
push ecx
mov edx, dword [ebp - 0x114]
push edx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
cmp esi, esp
call fcn.00485c0f
mov eax, 1
imul ecx, eax, 0
movsx edx, byte [ebp + ecx - 0x10c]
test edx, edx
je 0x44d818
mov esi, esp
lea eax, [ebp - 0x10c]
push eax
call dword [0x4bc00c]
add esp, 4
cmp esi, esp
call fcn.00485c0f
mov dword [ebp - 0x11c], eax
jmp 0x44d822
mov dword [ebp - 0x11c], 0
mov eax, dword [ebp - 0x11c]
push edx
mov ecx, ebp
push eax
lea edx, [0x44d858]
call fcn.00485bbb
pop eax
pop edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004854a8
add esp, 0x11c
cmp ebp, esp
call fcn.00485c0f
mov esp, ebp
pop ebp
ret

Function at 0x44e130
Capabilities:
Hash data with md5
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, esp
push 0xf0000000
push 1
push 0
push 0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
cmp esi, esp
call fcn.00485c0f
test eax, eax
je 0x44e17b
mov ecx, dword [ebp + 8]
add ecx, 4
mov esi, esp
push ecx
push 0
push 0
push 0x8003
mov edx, dword [ebp + 8]
mov eax, dword [edx]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
cmp esi, esp
call fcn.00485c0f
pop esi
cmp ebp, esp
call fcn.00485c0f
pop ebp
ret
Function at 0x45a440
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa8
push esi
push edi
lea edi, [ebp - 0xa8]
mov ecx, 0x2a
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov eax, dword [0x4c83a4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov dword [ebp - 8], ecx
mov edx, 4
shl edx, 0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + edx + 0x1a8]
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0xa0], 0x80
mov esi, esp
lea edx, [ebp - 0xa0]
push edx
lea eax, [ebp - 0x94]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.WS2_32.dll_getsockname]
cmp esi, esp
call fcn.00485c0f
test eax, eax
jne 0x45a4e8
mov dword [ebp - 0xa0], 0x80
mov esi, esp
lea edx, [ebp - 0xa0]
push edx
lea eax, [ebp - 0x94]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.WS2_32.dll_accept]
cmp esi, esp
call fcn.00485c0f
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.0042d010
add esp, 8
cmp dword [ebp - 0x10], 0xffffffff
jne 0x45a519
push str.Error_accept__ing_server_connect
mov ecx, dword [ebp - 8]
push ecx
call fcn.0042abc0
add esp, 8
mov eax, 0x1e
jmp 0x45a5f5
push str.Connection_accepted_from_server_n
mov edx, dword [ebp - 8]
push edx
call fcn.0042aa70
add esp, 8
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x284]
and ecx, 0xfffff7ff
mov edx, dword [ebp + 8]
mov dword [edx + 0x284], ecx
mov eax, 4
shl eax, 0
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x10]
mov dword [ecx + eax + 0x1a8], edx
push 1
mov eax, dword [ebp - 0x10]
push eax
call fcn.00472c30
add esp, 8
mov ecx, 1
shl ecx, 0
mov edx, dword [ebp + 8]
mov byte [edx + ecx + 0x1b8], 1
mov eax, dword [ebp - 8]
cmp dword [eax + 0x610], 0
je 0x45a5f3
mov dword [ebp - 0xa8], 0
push 1
mov ecx, dword [ebp - 8]
push ecx
call fcn.00410f60
add esp, 8
mov esi, esp
push 1
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x614]
push ecx
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x610]
call eax
add esp, 0xc
cmp esi, esp
call fcn.00485c0f
mov dword [ebp - 0xa8], eax
push 0
mov ecx, dword [ebp - 8]
push ecx
call fcn.00410f60
add esp, 8
cmp dword [ebp - 0xa8], 0
je 0x45a5f3
mov edx, dword [ebp + 8]
push edx
call fcn.0045a260
add esp, 4
mov eax, 0x2a
jmp 0x45a5f5
xor eax, eax
push edx
mov ecx, ebp
push eax
lea edx, [0x45a624]
call fcn.00485bbb
pop eax
pop edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004854a8
add esp, 0xa8
cmp ebp, esp
call fcn.00485c0f
mov esp, ebp
pop ebp
ret
Function at 0x45d730
Capabilities:
Check http status code

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov dword [ebp - 8], 0xcccccccc
mov dword [ebp - 4], 0xcccccccc
mov dword [ebp - 4], 0
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov dword [ebp - 8], ecx
mov eax, dword [ebp + 0xc]
cdq
mov ecx, 0x64
idiv ecx
cmp eax, 2
je 0x45d77b
push str.Couldnt_set_desired_mode
mov edx, dword [ebp - 8]
push edx
call fcn.0042abc0
add esp, 8
mov eax, 0x11
jmp 0x45d7f6
cmp dword [ebp + 0xc], 0xc8
je 0x45d799
mov eax, dword [ebp + 0xc]
push eax
push str.Got_a__03d_response_code_instead_of_the_assumed_200_n
mov ecx, dword [ebp - 8]
push ecx
call fcn.0042aa70
add esp, 0xc
cmp dword [ebp + 0x10], 0x13
jne 0x45d7b0
mov edx, dword [ebp + 8]
push edx
call fcn.0045bf90
add esp, 4
mov dword [ebp - 4], eax
jmp 0x45d7f3
cmp dword [ebp + 0x10], 0x14
jne 0x45d7c7
mov eax, dword [ebp + 8]
push eax
call fcn.0045c040
add esp, 4
mov dword [ebp - 4], eax
jmp 0x45d7f3
cmp dword [ebp + 0x10], 0x15
jne 0x45d7de
mov ecx, dword [ebp + 8]
push ecx
call fcn.0045c290
add esp, 4
mov dword [ebp - 4], eax
jmp 0x45d7f3
cmp dword [ebp + 0x10], 0x16
jne 0x45d7f3
mov edx, dword [ebp + 8]
push edx
call fcn.0045c2d0
add esp, 4
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
add esp, 8
cmp ebp, esp
call fcn.00485c0f
mov esp, ebp
pop ebp
ret

Function at 0x463d40
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
push esi
push edi
lea edi, [ebp - 0x1a4]
mov ecx, 0x69
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov eax, dword [0x4c83a4]
xor eax, ebp
mov dword [ebp - 4], eax
xor eax, eax
jne 0x463d67
mov ecx, 2
mov word [ebp - 0xc], cx
mov esi, esp
lea edx, [ebp - 0x1a0]
push edx
movzx eax, word [ebp - 0xc]
push eax
call dword [sym.imp.WS2_32.dll_WSAStartup]
cmp esi, esp
call fcn.00485c0f
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x463db4
mov ecx, dword [ebp - 8]
push ecx
push str.WSAStartup_failed___d_
mov edx, dword [ebp + 8]
push edx
call fcn.0042abc0
add esp, 0xc
mov eax, 2
jmp 0x463e23
mov esi, esp
call dword [sym.imp.WS2_32.dll_WSACleanup]
cmp esi, esp
call fcn.00485c0f
movzx eax, word [ebp - 0x1a0]
and eax, 0xff
movzx ecx, al
movzx edx, word [ebp - 0xc]
and edx, 0xff
movzx eax, dl
cmp ecx, eax
jne 0x463e09
movzx ecx, word [ebp - 0x1a0]
shr ecx, 8
and ecx, 0xff
movzx edx, cl
movzx eax, word [ebp - 0xc]
shr eax, 8
and eax, 0xff
movzx ecx, al
cmp edx, ecx
je 0x463e21
push str.insufficient_winsock_version_to_support_telnet
mov edx, dword [ebp + 8]
push edx
call fcn.0042abc0
add esp, 8
mov eax, 2
jmp 0x463e23
xor eax, eax
push edx
mov ecx, ebp
push eax
lea edx, [0x463e54]
call fcn.00485bbb
pop eax
pop edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004854a8
add esp, 0x1a4
cmp ebp, esp
call fcn.00485c0f
mov esp, ebp
pop ebp
ret
Function at 0x464740
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push esi
mov eax, 0xcccccccc
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov dword [ebp - 0x14], ecx
mov edx, 1
imul eax, edx, 0
mov byte [ebp + eax - 8], 0xff
mov ecx, 1
shl ecx, 0
mov dl, byte [ebp + 0xc]
mov byte [ebp + ecx - 8], dl
mov eax, 1
shl eax, 1
mov cl, byte [ebp + 0x10]
mov byte [ebp + eax - 8], cl
mov esi, esp
push 0
push 3
lea edx, [ebp - 8]
push edx
mov eax, 4
imul ecx, eax, 0
mov edx, dword [ebp + 8]
mov eax, dword [edx + ecx + 0x1a8]
push eax
call dword [sym.imp.WS2_32.dll_send]
cmp esi, esp
call fcn.00485c0f
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jge 0x4647ea
mov esi, esp
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp esi, esp
call fcn.00485c0f
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x18]
push ecx
push 0x4c3230
mov edx, dword [ebp - 0x14]
push edx
call fcn.0042abc0
add esp, 0xc
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
push 0x4c324c
mov edx, dword [ebp + 8]
mov eax, dword [edx]
push eax
call fcn.00464500
add esp, 0x10
push edx
mov ecx, ebp
push eax
lea edx, [0x464828]
call fcn.00485bbb
pop eax
pop edx
pop esi
add esp, 0x18
cmp ebp, esp
call fcn.00485c0f
mov esp, ebp
pop ebp
ret
Function at 0x47cf10
Capabilities:
Get hostname

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
mov dword [ebp - 8], 0xcccccccc
mov dword [ebp - 4], 0xcccccccc
mov eax, 1
imul ecx, eax, 0
mov edx, dword [ebp + 8]
mov byte [edx + ecx], 0
mov esi, esp
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.WS2_32.dll_gethostname]
cmp esi, esp
call fcn.00485c0f
mov dword [ebp - 4], eax
mov edx, dword [ebp + 8]
add edx, dword [ebp + 0xc]
mov byte [edx - 1], 0
cmp dword [ebp - 4], 0
je 0x47cf63
mov eax, dword [ebp - 4]
jmp 0x47cf82
push 0x2e
mov eax, dword [ebp + 8]
push eax
call fcn.00487c30
add esp, 8
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x47cf80
mov ecx, dword [ebp - 8]
mov byte [ecx], 0
xor eax, eax
pop esi
add esp, 8
cmp ebp, esp
call fcn.00485c0f
mov esp, ebp
pop ebp
ret
Function at 0x47ef40
Capabilities:
Hash data using md4
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push esi
push edi
lea edi, [ebp - 0x34]
mov ecx, 0xd
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0xc]
push eax
call fcn.0048f060
add esp, 4
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0x7fffffff
jbe 0x47ef79
mov eax, 0x1b
jmp 0x47f0d7
cmp dword [ebp - 4], 0
je 0x47ef9c
mov ecx, dword [ebp - 4]
shl ecx, 1
mov esi, esp
push ecx
call dword [section..data]
add esp, 4
cmp esi, esp
call fcn.00485c0f
mov dword [ebp - 0x34], eax
jmp 0x47efb6
mov esi, esp
push 0x4c9796
call dword [0x4bc00c]
add esp, 4
cmp esi, esp
call fcn.00485c0f
mov dword [ebp - 0x34], eax
mov edx, dword [ebp - 0x34]
mov dword [ebp - 8], edx
cmp dword [ebp - 8], 0
jne 0x47efcc
mov eax, 0x1b
jmp 0x47f0d7
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 8]
push edx
call fcn.0047f490
add esp, 0xc
mov dword [ebp - 0xc], 0
cmp dword [ebp - 0xc], 0
je 0x47eff5
mov eax, dword [ebp - 0xc]
jmp 0x47f0d7
mov esi, esp
push 0xf0000000
push 1
push 0
push 0
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
cmp esi, esp
call fcn.00485c0f
test eax, eax
je 0x47f0ac
mov esi, esp
lea ecx, [ebp - 0x20]
push ecx
push 0
push 0
push 0x8002
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
cmp esi, esp
call fcn.00485c0f
test eax, eax
je 0x47f097
mov dword [ebp - 0x2c], 0x10
mov esi, esp
push 0
mov eax, dword [ebp - 4]
shl eax, 1
push eax
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
cmp esi, esp
call fcn.00485c0f
mov esi, esp
push 0
lea eax, [ebp - 0x2c]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
push 2
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
cmp esi, esp
call fcn.00485c0f
mov esi, esp
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
cmp esi, esp
call fcn.00485c0f
mov esi, esp
push 0
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
cmp esi, esp
call fcn.00485c0f
push 5
push 0
mov edx, dword [ebp + 0x10]
add edx, 0x10
push edx
call fcn.00487550
add esp, 0xc
mov esi, esp
mov eax, dword [ebp - 8]
push eax
call dword [0x4bc004]
add esp, 4
cmp esi, esp
call fcn.00485c0f
xor eax, eax
push edx
mov ecx, ebp
push eax
lea edx, [0x47f0f8]
call fcn.00485bbb
pop eax
pop edx
pop edi
pop esi
add esp, 0x34
cmp ebp, esp
call fcn.00485c0f
mov esp, ebp
pop ebp
ret
Function at 0x47f2e0
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using des via winapi
Encrypt or decrypt via wincrypt

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push esi
push edi
lea edi, [ebp - 0x44]
mov ecx, 0x11
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov eax, dword [0x4c83a4]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x40], 8
mov esi, esp
push 0xf0000000
push 1
push 0
push 0
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
cmp esi, esp
call fcn.00485c0f
test eax, eax
jne 0x47f331
xor al, al
jmp 0x47f414
push 0x14
push 0
lea ecx, [ebp - 0x34]
push ecx
call fcn.00487550
add esp, 0xc
mov byte [ebp - 0x34], 8
mov byte [ebp - 0x33], 2
mov dword [ebp - 0x30], 0x6601
mov dword [ebp - 0x2c], 8
lea edx, [ebp - 0x28]
push edx
mov eax, dword [ebp + 0x10]
push eax
call fcn.0047f140
add esp, 8
push 8
lea ecx, [ebp - 0x28]
push ecx
call fcn.004842c0
add esp, 8
mov esi, esp
lea edx, [ebp - 0x18]
push edx
push 0
push 0
push 0x14
lea eax, [ebp - 0x34]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
cmp esi, esp
call fcn.00485c0f
test eax, eax
jne 0x47f3b3
mov esi, esp
push 0
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
cmp esi, esp
call fcn.00485c0f
xor al, al
jmp 0x47f414
push 8
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.004876b0
add esp, 0xc
mov esi, esp
mov edx, dword [ebp - 0x40]
push edx
lea eax, [ebp - 0x40]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
push 0
push 0
push 0
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
cmp esi, esp
call fcn.00485c0f
mov esi, esp
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
cmp esi, esp
call fcn.00485c0f
mov esi, esp
push 0
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
cmp esi, esp
call fcn.00485c0f
mov al, 1
push edx
mov ecx, ebp
push eax
lea edx, [0x47f440]
call fcn.00485bbb
pop eax
pop edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004854a8
add esp, 0x44
cmp ebp, esp
call fcn.00485c0f
mov esp, ebp
pop ebp
ret

Function at 0x486402
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x486441
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x486441
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x486441
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x486441
cmp dword [ecx + 0x74], 0xe
jbe 0x486441
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x495c9e
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x4c83a4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push 0x4b2790
push esi
call fcn.004a1719
pop ecx
pop ecx
test eax, eax
jne 0x495ccc
xor al, al
jmp 0x495d49
push ebx
lea eax, [ebp - 0x210]
xor ebx, ebx
push eax
push 0x104
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x210], ebx
push esi
push eax
call fcn.004959d3
mov edx, eax
add esp, 0x10
test edx, edx
jne 0x495d06
push dword [ebp - 0x210]
call fcn.0048e356
xor al, al
jmp 0x495d47
mov ecx, edx
push edi
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x495d0c
sub ecx, edi
sar ecx, 1
pop edi
cmp ecx, 3
je 0x495d2c
push edx
call fcn.00495bd5
pop ecx
test al, al
je 0x495cf7
push esi
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x495d3a
mov bl, 1
push dword [ebp - 0x210]
call fcn.0048e356
mov al, bl
pop ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.004854a8
leave
ret
Function at 0x496219
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00485db0
mov eax, dword [0x4c83a4]
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.0049d5d4
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x49625b
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x4963b7
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.00485c40
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 + 0x4ca2b0]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.004970f3
mov ecx, dword [esi*4 + 0x4ca2b0]
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 0x4963b0
cmp eax, dword [ecx + edi + 0x24]
jne 0x4963b0
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 0x4963b0
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.004970f3
add esp, 0x14
test edx, edx
jl 0x4963b0
jg 0x496326
test eax, eax
jb 0x4963b0
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x4963b0
jl 0x496340
cmp dword [ebp - 0x1008], eax
ja 0x4963b0
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x49635e
test ebx, ebx
je 0x496397
cmp ecx, edi
jae 0x496397
mov al, byte [ecx]
cmp al, 0xd
jne 0x496378
lea eax, [edi - 1]
cmp ecx, eax
jae 0x496384
cmp byte [ecx + 1], 0xa
jne 0x496384
inc ecx
jmp 0x496384
movzx eax, al
movsx eax, byte [eax + 0x4c8540]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x49635e
cmp edx, ebx
jne 0x49635e
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x4963b5
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.004854a8
leave
ret
Function at 0x49b3cf
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 + 0x4ca2b0]
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 0x49b40f
cmp byte [ebx], 0xa
jne 0x49b40f
or byte [edi + eax + 0x28], 4
jmp 0x49b414
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 0x49b513
mov dl, byte [eax]
cmp dl, 0x1a
je 0x49b4f6
inc eax
cmp dl, 0xd
je 0x49b440
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x49b466
cmp eax, ecx
jae 0x49b474
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 0x49b428
jmp 0x49b513
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 0x49b4f1
cmp dword [ebp - 0x10], 0
je 0x49b4f1
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x4ca2b0]
test byte [eax + edi + 0x28], 0x48
je 0x49b4cb
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x49b4b6
mov byte [esi], dl
jmp 0x49b4c7
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x4ca2b0]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x49b513
cmp byte [ebp - 1], 0xa
jne 0x49b4da
cmp esi, ebx
jne 0x49b4da
mov byte [esi], 0xa
jmp 0x49b512
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00497111
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x49b513
mov byte [esi], 0xd
jmp 0x49b512
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x4ca2b0]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x49b510
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x49b513
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x49b51c
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 + 0x4ca2b0]
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 0x49b562
cmp word [ebx], dx
jne 0x49b562
or byte [eax + edi + 0x28], 4
jmp 0x49b567
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 0x49b6ca
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 0x49b6aa
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x49b5a8
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x49b5de
cmp eax, edx
jae 0x49b5ec
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 0x49b583
jmp 0x49b6ca
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 0x49b6a5
cmp dword [ebp - 0x18], 0
je 0x49b6a5
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x4ca2b0]
test byte [eax + edi + 0x28], 0x48
je 0x49b67b
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 0x49b63f
mov word [esi], cx
jmp 0x49b676
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x4ca2b0]
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 + 0x4ca2b0]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x4ca2b0]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x49b6ca
pop eax
cmp word [ebp - 4], ax
jne 0x49b68b
cmp esi, ebx
jne 0x49b68b
mov word [esi], ax
jmp 0x49b6c7
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00497111
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x49b6ca
push 0xd
pop eax
jmp 0x49b686
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x4ca2b0]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x49b6c4
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x49b6ca
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret