joyce8/EMBER2024-capa huggingface dataset:
Function at 0x489340
Capabilities:
Get local ipv4 addresses
Get mac address on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
xor eax, eax
mov edi, ebx
stosd dword es:[edi], eax
stosw word es:[edi], ax
xor edi, edi
lea eax, [ebp + 8]
push eax
push edi
push edi
push edi
push 2
mov dword [ebp + 8], edi
call sub.iphlpapi.dll_GetAdaptersAddresses
mov esi, dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push esi
push edi
push eax
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
lea eax, [ebp + 8]
push eax
push esi
push edi
push edi
push 2
call sub.iphlpapi.dll_GetAdaptersAddresses
push 6
pop eax
cmp dword [esi + 0x34], eax
jbe 0x489395
mov dword [esi + 0x34], eax
xor eax, eax
cmp dword [esi + 0x34], edi
jbe 0x4893a9
mov cl, byte [esi + eax + 0x2c]
mov byte [eax + ebx], cl
inc eax
cmp eax, dword [esi + 0x34]
jb 0x48939c
push esi
push edi
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret 4

Function at 0x4893bd
Capabilities:
Check internet connectivity via wininet

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
lea esi, [ebp - 1]
call fcn.00424032
lea eax, [ebp - 8]
push eax
push 0x540d74
push 1
xor ebx, ebx
push ebx
push 0x540d64
mov dword [ebp - 8], ebx
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov eax, dword [ebp - 8]
cmp eax, ebx
je 0x489441
lea edx, [ebp - 0xc]
push edx
mov dword [ebp - 0xc], ebx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x34]
test eax, eax
mov eax, dword [ebp - 8]
je 0x48941d
cmp eax, ebx
je 0x48940e
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
cmp byte [ebp - 1], bl
je 0x489419
call dword [sym.imp.ole32.dll_CoUninitialize]
xor al, al
jmp 0x489469
test word [ebp - 0xc], 0x440
setne byte [ebp - 2]
cmp eax, ebx
je 0x489431
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
cmp byte [ebp - 1], bl
je 0x48943c
call dword [sym.imp.ole32.dll_CoUninitialize]
mov al, byte [ebp - 2]
jmp 0x489469
cmp byte [ebp - 1], bl
je 0x48944c
call dword [sym.imp.ole32.dll_CoUninitialize]
push ebx
lea eax, [ebp - 0x10]
push eax
mov dword [ebp - 0x10], ebx
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
test eax, eax
je 0x489419
mov eax, dword [ebp - 0x10]
shr eax, 5
not eax
and eax, 1
pop esi
pop ebx
leave
ret
Function at 0x489572
Capabilities:
Get hostname
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
mov dword [eax], ebx
push 0x104
lea eax, [ebp - 0x108]
push eax
mov byte [ebp - 0x108], bl
call dword [sym.imp.WS2_32.dll_gethostname]
test eax, eax
je 0x4895a3
xor al, al
jmp 0x48961b
push edi
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov edi, eax
cmp edi, ebx
jne 0x4895bb
xor al, al
jmp 0x48961a
mov eax, dword [edi + 0xc]
push esi
mov esi, dword [eax]
jmp 0x489605
lea eax, [ebp - 4]
push eax
push esi
call fcn.004894a6
test ebx, ebx
je 0x48960b
mov eax, esi
call fcn.0048946d
test al, al
je 0x4895fe
mov al, byte [esi]
test al, al
je 0x4895fe
cmp al, 0x7f
je 0x4895fe
cmp byte [ebp - 4], 0xff
jne 0x48960b
cmp byte [ebp - 3], 0xff
jne 0x48960b
cmp byte [ebp - 2], 0xff
jne 0x48960b
cmp byte [ebp - 1], 0xff
jne 0x48960b
mov eax, dword [edi + 0xc]
inc ebx
mov esi, dword [eax + ebx*4]
test esi, esi
jne 0x4895c3
jmp 0x489612
mov eax, dword [esi]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
xor eax, eax
test ebx, ebx
setg al
pop esi
pop edi
pop ebx
leave
ret 4

Function at 0x489659
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
push ebx
movzx ebx, word [ebp + 8]
push esi
push 0x104
lea esi, [ebp - 0x104]
call fcn.0044b0d0
mov eax, esi
push 0x3a
push eax
call fcn.005216b0
xor esi, esi
cmp eax, esi
pop ecx
pop ecx
je 0x489698
mov byte [eax], 0
inc eax
push eax
call fcn.005227bd
pop ecx
movzx ebx, ax
lea eax, [ebp - 0x104]
push eax
mov word [edi], bx
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp eax, 0xffffffff
mov dword [edi + 6], eax
je 0x4896b9
mov dword [edi + 2], 1
jmp 0x4896f4
lea eax, [ebp - 0x104]
push eax
mov dword [edi + 2], esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
cmp eax, esi
je 0x4896f4
mov ecx, dword [eax + 0xc]
cmp dword [ecx], esi
je 0x4896f4
mov ecx, dword [edi + 2]
mov edx, dword [eax + 0xc]
shl ecx, 2
add edx, ecx
cmp dword [edx], esi
je 0x4896f4
mov edx, dword [edx]
mov edx, dword [edx]
mov dword [ecx + edi + 6], edx
inc dword [edi + 2]
cmp dword [edi + 2], 4
jb 0x4896d4
pop esi
pop ebx
leave
ret 4
Function at 0x4896fa
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get socket status
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [esi]
sub esp, 0x320
cmp eax, 0xffffffff
push ebx
push edi
je 0x489713
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx]
call dword [eax]
test al, al
je 0x48972c
mov eax, dword [ebp + 8]
mov dword [eax], 1
jmp 0x489883
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
push esi
mov dword [esi], eax
call fcn.00428237
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
push 4
lea eax, [ebp - 4]
push eax
push 0x1001
mov ebx, 0xffff
push ebx
push dword [esi]
mov dword [ebp - 4], 0x40000
call edi
push 4
lea eax, [ebp - 4]
push eax
push 0x1002
push ebx
push dword [esi]
mov dword [ebp - 4], 0x80000
call edi
mov edi, dword [ebp + 0x10]
cmp dword [edi + 4], 0xffffffff
mov dword [ebp - 4], 2
je 0x489870
push 0x10
push edi
push dword [esi]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x4897df
mov eax, dword [edi + 4]
mov dword [ebp + 0x14], eax
movzx ecx, byte [ebp + 0x17]
push ecx
movzx ecx, byte [ebp + 0x16]
push ecx
movzx ecx, ah
movzx eax, al
push ecx
push eax
lea eax, [ebp - 0x320]
push str._d._d._d._d
push eax
call fcn.00401000
movzx eax, word [edi + 2]
add esp, 0x18
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov eax, dword [ebp + 8]
and dword [eax], 0
jmp 0x489883
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x489870
mov eax, dword [esi]
lea ecx, [ebp - 0xc]
push ecx
lea ecx, [ebp - 0x220]
push ecx
lea ecx, [ebp - 0x118]
xor edi, edi
xor ebx, ebx
push ecx
inc edi
mov dword [ebp - 0x114], eax
mov dword [ebp - 0x21c], eax
push ebx
inc eax
push eax
mov dword [ebp - 0x118], edi
mov dword [ebp - 0x220], edi
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], 0x30d40
call dword [sym.imp.WS2_32.dll_select]
cmp eax, ebx
jg 0x489854
jl 0x489870
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx]
call dword [eax]
test al, al
jne 0x48986d
mov eax, 0xc8
cmp dword [ebp + 0x14], eax
jbe 0x489870
sub dword [ebp + 0x14], eax
jmp 0x4897f0
lea eax, [ebp - 0x118]
push eax
push dword [esi]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x489870
mov eax, dword [ebp + 8]
mov dword [eax], ebx
jmp 0x489883
mov dword [ebp - 4], edi
push dword [esi]
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 4]
or dword [esi], 0xffffffff
mov dword [eax], ecx
pop edi
pop ebx
leave
ret 0x10
Function at 0x489906
Capabilities:
Get socket status
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
push ebx
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebx]
push esi
push edi
mov ecx, ebx
call dword [eax]
test al, al
jne 0x4899be
mov esi, dword [ebp + 0x10]
xor edi, edi
push edi
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push esi
call dword [sym.imp.WS2_32.dll_send]
cmp eax, dword [ebp + 0x18]
jge 0x4899c9
cmp eax, edi
jge 0x489960
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x489966
mov eax, dword [ebp + 8]
mov dword [eax], 2
pop edi
pop esi
pop ebx
leave
ret 0x18
add dword [ebp + 0x14], eax
sub dword [ebp + 0x18], eax
lea eax, [ebp - 8]
push eax
push edi
lea eax, [ebp - 0x110]
push eax
push edi
lea eax, [esi + 1]
push eax
mov dword [ebp - 8], edi
mov dword [ebp - 4], 0x30d40
mov dword [ebp - 0x10c], esi
mov dword [ebp - 0x110], 1
call dword [sym.imp.WS2_32.dll_select]
cmp eax, edi
jg 0x4899b0
jne 0x4899ac
mov eax, 0xc8
cmp dword [ebp + 0x1c], eax
jle 0x489950
sub dword [ebp + 0x1c], eax
jmp 0x4899b0
cmp eax, edi
jl 0x489950
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax]
test al, al
je 0x489928
mov eax, dword [ebp + 8]
mov dword [eax], 1
jmp 0x489959
mov eax, dword [ebp + 8]
mov dword [eax], edi
jmp 0x489959

Function at 0x4899d0
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
push ebx
mov ebx, dword [ebp + 8]
mov eax, dword [ebx]
push esi
mov ecx, ebx
call dword [eax]
test al, al
jne 0x489a40
mov esi, dword [ebp + 0xc]
cmp esi, 0xffffffff
je 0x489a4d
xor eax, eax
lea ecx, [ebp - 8]
push ecx
push eax
push eax
mov dword [ebp - 8], eax
lea eax, [ebp - 0x10c]
push eax
lea eax, [esi + 1]
push eax
mov dword [ebp - 0x108], esi
mov dword [ebp - 0x10c], 1
mov dword [ebp - 4], 0x30d40
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jg 0x489a48
jl 0x489a48
mov eax, 0xc8
cmp dword [ebp + 0x10], eax
jbe 0x489a4d
sub dword [ebp + 0x10], eax
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax]
test al, al
je 0x4899eb
mov dword [edi], 1
jmp 0x489a53
and dword [edi], 0
jmp 0x489a53
mov dword [edi], 2
pop esi
mov eax, edi
pop ebx
leave
ret 0xc

Function at 0x489a5b
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0x18]
xor eax, eax
cmp dword [ebp + 0x14], eax
push ebx
push edi
mov dword [ecx], eax
jne 0x489a70
mov dword [esi], eax
jmp 0x489aaf
push dword [ebp + 0x1c]
mov ebx, dword [ebp + 0xc]
push ecx
mov eax, esp
push dword [ebp + 8]
lea edi, [ebp + 0x1c]
mov dword [eax], ebx
call fcn.004899d0
mov eax, dword [ebp + 0x1c]
test eax, eax
jne 0x489a6c
push eax
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push ebx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jle 0x489aa9
mov ecx, dword [ebp + 0x18]
and dword [esi], 0
mov dword [ecx], eax
jmp 0x489aaf
mov dword [esi], 2
pop edi
mov eax, esi
pop ebx
pop ebp
ret 0x18
Function at 0x489b0b
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
and dword [esi], 0
push ebx
mov ebx, dword [ebp + 0x10]
push edi
push dword [ebp + 0x18]
lea edi, [ebp + 0x18]
push ecx
mov eax, esp
push dword [ebp + 0xc]
mov dword [eax], ebx
call fcn.004899d0
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x489b37
mov eax, dword [ebp + 8]
mov dword [eax], ecx
jmp 0x489ba7
mov edi, dword [sym.imp.WS2_32.dll_recv]
push 2
push 0x30
push dword [ebp + 0x14]
push ebx
call edi
test eax, eax
mov dword [ebp + 0x10], eax
jg 0x489b59
mov eax, dword [ebp + 8]
mov dword [eax], 2
jmp 0x489ba7
and dword [ebp + 0x18], 0
test eax, eax
mov dword [esi], eax
jbe 0x489b97
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x18]
mov cl, byte [edx + ecx]
test cl, cl
je 0x489b87
movsx eax, cl
push eax
push 0x571488
call fcn.005216b0
test eax, eax
pop ecx
pop ecx
jne 0x489b91
mov eax, dword [ebp + 0x10]
inc dword [ebp + 0x18]
cmp dword [ebp + 0x18], eax
jb 0x489b63
jmp 0x489b97
mov eax, dword [ebp + 0x18]
inc eax
mov dword [esi], eax
push 0
push dword [esi]
push dword [ebp + 0x14]
push ebx
call edi
mov eax, dword [ebp + 8]
and dword [eax], 0
pop edi
pop ebx
pop ebp
ret 0x14

Function at 0x48a900
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
cmp dx, 0x200
push ebx
mov ebx, dword [ebp + 8]
jg 0x48a971
cmp word [ebp + 0xc], 0x5a0
jge 0x48a971
movsx eax, word [ecx]
push esi
movsx esi, dx
cmp esi, eax
mov dword [ebp - 4], esi
jl 0x48a927
mov esi, eax
sub eax, esi
lea eax, [eax + ecx + 4]
push esi
push eax
lea ecx, [ebx + 4]
push ecx
call fcn.005201d0
movsx eax, word [ebp + 0xc]
add esp, 0xc
push 0
lea edx, [ebp + 8]
push edx
mov edx, dword [edi]
push eax
lea ecx, [esi + ebx + 4]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp + 8]
sub dword [edi + 8], eax
mov ecx, dword [ebp + 0xc]
cmp esi, dword [ebp - 4]
lea edx, [esi + ecx]
pop esi
mov word [ebx], dx
setge al
pop ebx
mov esp, ebp
pop ebp
ret 8
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x4932cd
Capabilities:
Check if file exists
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x460
push esi
push edi
mov edi, 0x5aac40
mov eax, edi
lea esi, [ebp - 0x460]
call fcn.00401d5c
jmp 0x493385
lea eax, [ebp - 0x430]
push eax
push edi
lea eax, [ebp - 0x20c]
push eax
call fcn.00401dde
lea eax, [ebp - 0x20c]
push eax
call fcn.00401d29
test al, al
je 0x49337a
lea ecx, [ebp - 0x20c]
call fcn.00493234
movzx eax, ax
cmp ax, 0xfffe
je 0x49337a
movzx esi, ax
cmp word [esi*2 + 0x5aae48], 0
ja 0x49337a
cmp byte [esi + 0x5cae48], 0
jne 0x49337a
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x493366
and al, 1
je 0x493366
push 0x80
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov byte [esi + 0x5dae48], 0
lea esi, [ebp - 0x460]
call fcn.00401d99
cmp dword [ebp - 0x460], 0xffffffff
jne 0x4932ef
pop edi
pop esi
leave
ret

Function at 0x493396
Capabilities:
Check if file exists
Delete file
Get file attributes
Set file attributes

Disassembly:
cmp word [0x5aac40], 0
je 0x4933be
mov ecx, str..aud
call fcn.004932cd
mov ecx, str..grf
call fcn.004932cd
mov ecx, str..audinfo
jmp fcn.004932cd
ret

Function at 0x4933bf
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x410
push edi
movzx esi, si
xor edi, edi
push dword [edi + 0x5a600c]
lea eax, [ebp - 0x208]
push esi
push str._d_s
push eax
call fcn.00401000
add esp, 0x10
lea eax, [ebp - 0x208]
push eax
push 0x5aac40
lea eax, [ebp - 0x410]
push eax
call fcn.00401dde
lea eax, [ebp - 0x410]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
add edi, 4
cmp edi, 0xc
jb 0x4933ce
and dword [esi*4 + 0x5eaec4], 0
mov byte [esi + 0x5dae48], 0
pop edi
leave
ret
Function at 0x497e28
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1468
call fcn.0052d050
push ebx
mov ebx, dword [ebp + 0x10]
mov ecx, dword [ebx]
push esi
push edi
lea eax, [ebp - 0x125c]
call fcn.004019a9
mov esi, dword [ebp + 0xc]
mov eax, dword [esi]
push 0
push 0x583dc4
mov ecx, esi
call dword [eax + 0x20]
mov eax, dword [esi]
push 1
lea ecx, [ebp - 0x125c]
push ecx
mov ecx, esi
call dword [eax + 0x20]
mov eax, dword [ebp + 8]
mov dword [eax], 2
lea eax, [ebp - 0x20c]
push eax
call fcn.00401cb0
lea eax, [ebp - 0x20c]
push eax
push dword [ebx]
call fcn.00401c07
mov edi, dword [ebx + 4]
push 0x54acfc
lea edx, [ebp - 0x20c]
call fcn.00449faf
lea eax, [ebp - 0x1464]
push eax
mov eax, dword [ebx]
call fcn.00401016
push 6
pop edi
lea esi, [ebp - 0x1030]
mov dword [ebp - 0x1040], 0x595690
mov dword [ebp - 0x103c], edi
mov byte [ebp - 0x1032], 0xff
mov byte [ebp - 0x1031], 0
mov byte [ebp - 0x1038], 0
call fcn.00496f05
mov eax, 0x1fa
xor esi, esi
push eax
mov dword [ebp - 0x1054], esi
mov dword [ebp - 0x1050], 0x200
mov dword [ebp - 0x104c], edi
mov dword [ebp - 0x1044], esi
mov dword [ebp - 0x1048], eax
call fcn.0051fd80
pop ecx
push dword [ebx + 4]
mov dword [ebp - 0x211], eax
lea eax, [ebp - 0x20c]
push eax
push dword [ebp + 0xc]
lea eax, [ebp - 0x1054]
push eax
call fcn.00497d4e
test eax, eax
je 0x497f38
mov eax, dword [ebp + 8]
mov dword [eax], esi
cmp dword [ebp - 0x625], esi
mov eax, 0x3e80
jne 0x497f4a
mov eax, 0x2ee0
mov dword [ebx + 8], eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push dword [ebp - 0x211]
call fcn.00520947
pop ecx
push dword [ebp - 0x615]
call fcn.00520947
mov eax, dword [ebp + 8]
pop ecx
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x4985da
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push esi
mov esi, eax
push 0
add esi, 4
push 0
mov eax, esi
call fcn.00401a5b
movzx eax, word [edi + 0x10]
lea ecx, [eax + 0x26]
add eax, 0x12
mov dword [ebp - 4], eax
push 0x14
lea eax, [ebp - 0x14]
push eax
push esi
mov dword [ebp - 0x14], 0x46464952
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], 0x45564157
mov dword [ebp - 8], 0x20746d66
call fcn.00401eb7
push dword [ebp - 4]
push edi
push esi
call fcn.00401eb7
mov eax, dword [ebp - 4]
add eax, 0x14
pop esi
leave
ret
Function at 0x499620
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push edi
mov edi, eax
mov dword [ebp - 4], 0
mov edi, edi
mov edx, dword [edi + 0x1a]
push 0
lea eax, [ebp - 8]
push eax
push 4
lea ecx, [ebp - 4]
push ecx
push edx
call ebx
mov eax, dword [ebp - 4]
bswap eax
mov ecx, eax
shr ecx, 0x18
and cl, 0x7f
mov dword [ebp - 4], eax
je 0x4996c2
cmp cl, 1
je 0x49969e
cmp cl, 2
je 0x49969e
cmp cl, 5
je 0x49969e
cmp cl, 4
je 0x49969e
cmp cl, 6
je 0x49969e
cmp cl, 3
jne 0x49968c
lea eax, [ebp - 4]
call fcn.004996d0
jmp 0x4996b0
push 1
and eax, 0xffffff
cdq
push 0
push edx
push eax
mov eax, dword [edi + 0x1a]
push eax
jmp 0x4996ae
mov ecx, dword [edi + 0x1a]
push 1
and eax, 0xffffff
cdq
push 0
push edx
push eax
push ecx
call esi
mov edx, dword [ebp - 4]
shr edx, 0x1f
cmp dl, 1
jne 0x499640
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov byte [edi + 0xd], 3
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4996d0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov ecx, dword [eax]
and ecx, 0xffffff
mov eax, 0x38e38e39
mul ecx
push esi
mov esi, edx
lea eax, [edi + 0x16e]
shr esi, 2
push eax
call fcn.004f3f4b
xor eax, eax
cmp esi, eax
mov dword [ebp - 0x24], 0xffffffff
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov word [ebp - 0x14], ax
jbe 0x4997bb
push ebx
mov dword [ebp - 4], esi
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
xor ebx, ebx
jmp 0x499725
xor eax, eax
mov ecx, dword [edi + 0x1a]
push eax
lea edx, [ebp - 8]
push edx
push 8
lea eax, [ebp - 0x24]
push eax
push ecx
call esi
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x20]
push 0
bswap edx
lea ecx, [ebp - 0xc]
push ecx
bswap eax
mov dword [ebp - 0x20], edx
push 8
lea edx, [ebp - 0x1c]
mov dword [ebp - 0x24], eax
mov eax, dword [edi + 0x1a]
push edx
push eax
call esi
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
push 0
bswap ecx
lea eax, [ebp - 0x10]
push eax
bswap edx
mov dword [ebp - 0x18], ecx
push 2
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x1c], edx
mov edx, dword [edi + 0x1a]
push ecx
push edx
call esi
mov ax, word [ebp - 0x14]
mov edx, dword [ebp - 0x24]
mov ch, al
mov cl, ah
mov eax, dword [edi + 0x16e]
add eax, ebx
add ebx, 0x12
sub dword [ebp - 4], 1
mov word [ebp - 0x14], cx
mov dword [eax], edx
mov ecx, dword [ebp - 0x20]
mov dword [eax + 4], ecx
mov edx, dword [ebp - 0x1c]
mov dword [eax + 8], edx
mov ecx, dword [ebp - 0x18]
mov dword [eax + 0xc], ecx
mov dx, word [ebp - 0x14]
mov word [eax + 0x10], dx
jne 0x499723
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x499b60
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov edx, dword [edi]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
push 0
lea ecx, [ebp - 4]
push ecx
mov esi, eax
push 2
lea eax, [esi + 4]
push eax
push edx
call ebx
mov ax, word [esi + 4]
mov ch, al
push 0
lea edx, [ebp - 4]
push edx
push 2
mov cl, ah
lea eax, [esi + 6]
push eax
mov word [esi + 4], cx
mov eax, dword [edi]
push eax
call ebx
mov cx, word [esi + 6]
mov dh, cl
push 0
lea eax, [esi + 8]
mov dl, ch
lea ecx, [ebp - 4]
push ecx
push 3
push eax
mov word [esi + 6], dx
mov edx, dword [edi]
push edx
call ebx
mov eax, dword [esi + 8]
push 0
bswap eax
lea ecx, [ebp - 4]
push ecx
mov dword [esi + 8], eax
shr dword [esi + 8], 8
mov edx, dword [edi]
push 3
lea eax, [esi + 0xc]
push eax
push edx
call ebx
mov eax, dword [esi + 0xc]
bswap eax
mov dword [esi + 0xc], eax
shr dword [esi + 0xc], 8
xor eax, eax
push eax
lea ecx, [ebp - 4]
push ecx
push 8
lea edx, [ebp - 0x10]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov eax, dword [edi]
push edx
push eax
call ebx
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
bswap eax
mov edx, eax
shr edx, 0xc
mov dword [esi + 0x10], edx
mov edx, eax
shr edx, 9
bswap ecx
and dl, 7
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x10], ecx
add dl, 1
mov byte [esi + 0x14], dl
mov edx, eax
shr edx, 4
and eax, 0xf
mov dword [esi + 0x1a], eax
push 0
and dl, 0x1f
lea eax, [ebp - 4]
push eax
add dl, 1
mov byte [esi + 0x15], dl
mov dword [esi + 0x16], ecx
mov ecx, dword [edi]
push 0x10
add esi, 0x1e
push esi
push ecx
call ebx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x49ab80
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push esi
push edi
mov edi, eax
mov eax, dword [edi + 0x10]
sub eax, dword [edi + 0xc]
lea esi, [edi + 4]
jns 0x49ab97
add eax, dword [esi]
cmp eax, 0x7fff
jae 0x49ac1c
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
push ebx
lea eax, [ebp - 8]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x49abba
xor ebx, ebx
mov dword [ebp - 0xc], ebx
jmp 0x49abc3
mov eax, dword [ebp - 4]
mov ebx, dword [ebp - 8]
mov dword [ebp - 0xc], eax
push 1
lea edx, [ebp - 0x10]
push edx
xor ecx, ecx
push ecx
xor eax, eax
push eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x49abe4
mov dword [ebp - 0x14], eax
jmp 0x49abed
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x14], edx
sub ebx, eax
cmp ebx, 0x7fff
jbe 0x49abfc
mov ebx, 0x7fff
mov ecx, dword [edi]
mov edx, dword [ebp + 8]
push 0
lea eax, [ebp + 8]
push eax
mov eax, dword [edx]
push ebx
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [edi]
push ebx
push ecx
call fcn.004e552d
pop ebx
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
push edx
push eax
call fcn.0043003a
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc