joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4aea55
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x320
mov eax, dword [0x5df7e4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
or ebx, 0xffffffff
push edi
test esi, esi
je 0x4aea85
xor edi, edi
xor edx, edx
mov eax, edi
inc edx
cmp dword [esi + eax*8], ebx
jne 0x4aea9b
inc eax
cmp eax, edx
jb 0x4aea7b
mov ecx, ebx
call fcn.004ae7e9
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005121be
leave
ret
mov ecx, dword [esi]
xor eax, eax
mov dword [ebp - 0x110], edi
mov dword [ebp - 0x218], edi
mov dword [ebp - 0x320], edi
mov word [esi + 6], ax
cmp ecx, ebx
je 0x4aeaf1
movzx eax, word [esi + 4]
test al, 7
je 0x4aeaf1
test al, 1
je 0x4aead1
mov dword [ebp - 0x10c], ecx
mov dword [ebp - 0x110], edx
test al, 4
je 0x4aeae1
mov dword [ebp - 0x214], ecx
mov dword [ebp - 0x218], edx
test al, 2
je 0x4aeaf1
mov dword [ebp - 0x31c], ecx
mov dword [ebp - 0x320], edx
push edi
lea eax, [ebp - 0x320]
push eax
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x110]
push eax
push edi
call dword [sym.imp.WS2_32.dll_select]
cmp eax, ebx
jne 0x4aeb25
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
je 0x4aeaf1
cmp eax, 0x2714
je 0x4aeaf1
jmp 0x4aeb29
test eax, eax
jns 0x4aeb30
mov eax, ebx
jmp 0x4aea8c
jne 0x4aeb39
xor eax, eax
jmp 0x4aea8c
xor eax, eax
mov word [esi + 6], ax
cmp dword [esi], ebx
je 0x4aeb9d
mov ebx, dword [sym.imp.WS2_32.dll___WSAFDIsSet]
lea eax, [ebp - 0x110]
push eax
push dword [esi]
call ebx
test eax, eax
je 0x4aeb5f
xor eax, eax
inc eax
or word [esi + 6], ax
lea eax, [ebp - 0x218]
push eax
push dword [esi]
call ebx
test eax, eax
je 0x4aeb73
or word [esi + 6], 4
lea eax, [ebp - 0x320]
push eax
push dword [esi]
call ebx
movzx ecx, word [esi + 6]
test eax, eax
je 0x4aeb92
or ecx, 2
mov word [esi + 6], cx
movzx eax, cx
jmp 0x4aeb94
mov eax, ecx
test ax, ax
push 1
pop eax
cmovne edi, eax
mov eax, edi
jmp 0x4aea8c

Function at 0x4aeba4
Capabilities:
Parse pe header

Disassembly:
movsx eax, cl
add eax, 0xffffff9f
cmp eax, 0x19
ja case.default.0x4aebaf
jmp dword [eax*4 + 0x4aec08]
mov al, 0x41
ret
mov al, 0x42
ret
mov al, 0x43
ret
mov al, 0x44
ret
mov al, 0x45
ret
mov al, 0x46
ret
mov al, 0x47
ret
mov al, 0x48
ret
mov al, 0x49
ret
mov al, 0x4a
ret
mov al, 0x4b
ret
mov al, 0x4c
ret
mov al, 0x4d
ret
mov al, 0x4e
ret
mov al, 0x4f
ret
mov al, 0x50
ret
mov al, 0x51
ret
mov al, 0x52
ret
mov al, 0x53
ret
mov al, 0x54
ret
mov al, 0x55
ret
mov al, 0x56
ret
mov al, 0x57
ret
mov al, 0x58
ret
mov al, 0x59
ret
mov al, 0x5a
ret
mov al, cl
ret
Function at 0x4b3db6
Capabilities:
Check http status code

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
mov edi, ecx
lea eax, [edx - 0xc8]
xor esi, esi
mov ecx, dword [edi]
cmp eax, 0x64
jb 0x4b3ddf
push str.Couldnt_set_desired_mode
push ecx
call fcn.0049dc37
pop ecx
pop ecx
push 0x11
pop eax
jmp 0x4b3e33
cmp edx, 0xc8
je 0x4b3df6
push edx
push str.Got_a__03d_response_code_instead_of_the_assumed_200_n
push ecx
call fcn.0049dbc9
add esp, 0xc
mov eax, dword [ebp + 8]
cmp eax, 0x11
jne 0x4b3e07
mov ecx, edi
call fcn.004b312e
jmp 0x4b3e2f
cmp eax, 0x12
jne 0x4b3e15
mov ecx, edi
call fcn.004b316e
jmp 0x4b3e2f
cmp eax, 0x13
jne 0x4b3e1e
push 0xb
jmp 0x4b3e25
cmp eax, 0x14
jne 0x4b3e31
push 0xc
mov dl, 1
mov ecx, edi
call fcn.004b350b
pop ecx
mov esi, eax
mov eax, esi
pop edi
pop esi
pop ecx
pop ebp
ret

Function at 0x4b8229
Capabilities:
Hash data with md5

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
mov eax, dword [0x5df7e4]
xor eax, ebp
mov dword [ebp - 4], eax
and dword [ebp - 0x54], 0
and dword [ebp - 0x58], 0
push esi
push edi
mov esi, edx
mov dword [ebp - 0x68], 0x67452301
push esi
mov edi, ecx
mov dword [ebp - 0x64], 0xefcdab89
mov dword [ebp - 0x60], 0x98badcfe
mov dword [ebp - 0x5c], 0x10325476
call fcn.0053f120
push eax
mov edx, esi
lea ecx, [ebp - 0x68]
call fcn.004b7a47
push 8
lea edx, [ebp - 0x58]
lea ecx, [ebp - 0xc]
call fcn.004b81f1
mov edx, dword [ebp - 0x58]
push 0x38
pop ecx
shr edx, 3
and edx, 0x3f
push 0x78
sub ecx, edx
pop eax
sub eax, edx
cmp edx, 0x38
mov edx, 0x5b7a40
cmovb eax, ecx
lea ecx, [ebp - 0x68]
push eax
call fcn.004b7a47
push 8
lea edx, [ebp - 0xc]
lea ecx, [ebp - 0x68]
call fcn.004b7a47
push 0x10
lea edx, [ebp - 0x68]
mov ecx, edi
call fcn.004b81f1
push 0x58
lea eax, [ebp - 0x68]
push 0
push eax
call fcn.0052a280
mov ecx, dword [ebp - 4]
add esp, 0x24
xor ecx, ebp
pop edi
pop esi
call fcn.005121be
leave
ret
Function at 0x4b9335
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, ecx
push edi
mov edi, edx
mov ecx, dword [esi]
mov eax, dword [ecx + 4]
mov dword [ebp - 4], eax
cmp eax, 2
jne 0x4b935c
push dword [ecx + 8]
mov ebx, dword [ebp + 8]
push ebx
push 1
push edi
call dword [esi + 0xc]
jmp 0x4b938b
mov eax, dword [esi + 8]
test eax, eax
jne 0x4b937e
push 0x5bcec0
push dword [ecx + 8]
call fcn.0053d18d
mov dword [esi + 8], eax
pop ecx
pop ecx
test eax, eax
jne 0x4b937e
or eax, 0xffffffff
jmp 0x4b93b3
mov ebx, dword [ebp + 8]
push eax
push ebx
push 1
push edi
call fcn.00535602
mov edi, eax
add esp, 0x10
test edi, edi
je 0x4b9398
cmp edi, ebx
jbe 0x4b93b1
cmp dword [ebp - 4], 2
je 0x4b93ab
push dword [esi + 8]
call fcn.00534efe
and dword [esi + 8], 0
pop ecx
mov eax, dword [esi]
mov eax, dword [eax]
mov dword [esi], eax
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4b96b0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x4b9709
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x4b9709
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 0x10]
lea edx, [esi + eax]
and ecx, 0xf
jbe 0x4b96fa
cmp esi, edx
jae 0x4b9709
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
sub ecx, 1
jne 0x4b96e8
cmp esi, edx
jae 0x4b9709
cmp word [esi], 0
je 0x4b9709
mov eax, esi
pop esi
pop ebp
ret
xor eax, eax
pop esi
pop ebp
ret
Function at 0x4bd7c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
mov eax, dword [ecx]
mov eax, dword [eax]
cmp eax, method.CPrivateOutStream.virtual_0
jne 0x4bd7f6
push dword [ecx + 0x10]
push dword [ebp + 0x10]
push 1
push dword [ebp + 0xc]
call fcn.00535c15
mov ecx, dword [ebp + 0x14]
add esp, 0x10
mov dword [ecx], eax
xor eax, eax
pop ebp
ret 0x10
pop ebp
ret 0x10
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call eax
jmp 0x4bd7f2
Function at 0x4c0dc0
Capabilities:
Get memory capacity

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [0x5df7e4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
lea eax, [ebp - 0x44]
mov dword [ebp - 0x44], 0x40
push eax
mov bl, 1
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
shld eax, ecx, 0x14
shl ecx, 0x14
cmp dword [ebp - 0x38], eax
ja 0x4c0e0e
jb 0x4c0dfd
cmp dword [ebp - 0x3c], ecx
jae 0x4c0e0e
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005121be
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, bl
xor ecx, ebp
pop ebx
call fcn.005121be
mov esp, ebp
pop ebp
ret
Function at 0x4c0e20
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55aa52
mov eax, dword fs:[0]
push eax
sub esp, 0x240
mov eax, dword [0x5df7e4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov byte [ebp - 0x23d], 0
call fcn.004bb5b0
mov ecx, eax
test ecx, ecx
je 0x4c100d
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x244], eax
mov dword [ebp - 4], 0
mov eax, 0x56c28c
lea ecx, [ebp - 0x244]
test eax, 0xffff0000
jne 0x4c0e96
movzx eax, ax
push eax
call fcn.004bb960
jmp 0x4c0ea2
push 9
push 0x56c28c
call fcn.004bbc70
mov dword [ebp - 4], 1
call fcn.004bb5b0
mov ecx, eax
test ecx, ecx
je 0x4c1017
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x248], eax
mov byte [ebp - 4], 2
mov eax, str.AliWorkbench.exe
lea ecx, [ebp - 0x248]
test eax, 0xffff0000
jne 0x4c0ee7
movzx eax, ax
push eax
call fcn.004bb960
jmp 0x4c0ef3
push 0x10
push str.AliWorkbench.exe
call fcn.004bbc70
mov byte [ebp - 4], 3
push 0
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov edi, dword [ebp - 0x244]
mov ebx, eax
mov esi, dword [ebp - 0x248]
mov dword [ebp - 0x24c], ebx
cmp ebx, 0xffffffff
je 0x4c0fa6
push 0x228
lea eax, [ebp - 0x238]
push 0
push eax
call fcn.0052a280
add esp, 0xc
mov dword [ebp - 0x23c], 0x22c
lea eax, [ebp - 0x23c]
push eax
push ebx
call sub.KERNEL32.dll_Process32FirstW
xor ebx, ebx
test eax, eax
je 0x4c0fa0
cmp ebx, 0x400
jg 0x4c0fa0
lea eax, [ebp - 0x218]
inc ebx
push eax
push edi
call fcn.0052dcd6
add esp, 8
test eax, eax
je 0x4c0f99
lea eax, [ebp - 0x218]
push eax
push esi
call fcn.0052dcd6
add esp, 8
test eax, eax
je 0x4c0f99
lea eax, [ebp - 0x23c]
push eax
push dword [ebp - 0x24c]
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x4c0f50
jmp 0x4c0fa0
mov byte [ebp - 0x23d], 1
mov ebx, dword [ebp - 0x24c]
test ebx, ebx
je 0x4c0fb1
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 1
lea edx, [esi - 0x10]
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4c0fcf
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
add edi, 0xfffffff0
lock xadd dword [edi + 0xc], esi
dec esi
test esi, esi
jg 0x4c0feb
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov al, byte [ebp - 0x23d]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005121be
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.004b95c0
push 0x80004005
call fcn.004b95c0
int3
Function at 0x4c1030
Capabilities:
Access the windows event log
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x208
mov eax, dword [0x5df7e4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
lea eax, [ebp + 0xc]
push eax
push 0
push dword [ebp + 8]
lea eax, [ebp - 0x204]
push accept
push eax
call fcn.0049c9a9
push dword [eax + 4]
push dword [eax]
call fcn.00530ff5
mov esi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea eax, [ebp - 0x204]
add esp, 0x1c
mov dword [ebp - 0x208], eax
push eax
call esi
push 0x56c120
call esi
push dword [0x5e4ea4]
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov esi, eax
test esi, esi
je 0x4c10be
push 0
lea eax, [ebp - 0x208]
push eax
push 0
push 1
push 0
push 0
push 0
push 4
push esi
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.005121be
mov esp, ebp
pop ebp
ret
Function at 0x4c1d60
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55ad06
mov eax, dword fs:[0]
push eax
sub esp, 0x114
mov eax, dword [0x5df7e4]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 4], 0
mov eax, dword [ebp + 8]
mov dword [ecx + 0x14], eax
push 0
push 0
push ecx
push 0x4c1d40
push 0
push 0
call fcn.00531215
add esp, 0x18
test eax, eax
je 0x4c1dbf
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.005121be
mov esp, ebp
pop ebp
ret 4
Function at 0x4ca5c0
Capabilities:
Check if file exists
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55c631
mov eax, dword fs:[0]
push eax
sub esp, 0x210
mov eax, dword [0x5df7e4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x218]
push eax
push 1
push 0
push 0x1a
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
je 0x4ca60f
xor al, al
jmp 0x4ca6e7
call fcn.004bb5b0
mov ecx, eax
test ecx, ecx
je 0x4ca701
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x21c], eax
mov dword [ebp - 4], 0
lea eax, [ebp - 0x218]
test eax, 0xffff0000
jne 0x4ca651
movzx eax, ax
lea ecx, [ebp - 0x21c]
push eax
call fcn.004bb960
jmp 0x4ca682
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4ca660
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x21c]
call fcn.004bbc70
mov dword [ebp - 4], 1
lea eax, [ebp - 0x21c]
push eax
mov ecx, esi
call fcn.004bad70
mov dword [ebp - 4], 0xffffffff
or eax, 0xffffffff
mov edx, dword [ebp - 0x21c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4ca6bc
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x56cc60
mov ecx, esi
call fcn.004c8fb0
push dword [esi]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4ca6e5
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x4ca608
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005121be
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.004b95c0
int3
Function at 0x4cba60
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push 0
push 0
push ecx
push 0x4cb640
push 0
push 0
mov dword [ecx + 4], eax
call fcn.00531215
add esp, 0x18
test eax, eax
je 0x4cba8d
mov dword [ebp + 8], eax
pop ebp
jmp dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebp
ret 4

Function at 0x4cc000
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x5df7e4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
push edi
cmp dword [esi + 0x38], 0
je 0x4cc0a1
cmp byte [esi + 0x3d], 0
je 0x4cc0a1
mov eax, dword [esi]
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x4cc057
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
mov edx, dword [ecx]
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x40]
push eax
call dword [edx + 0x20]
sub eax, 0
je 0x4cc069
sub eax, 1
je 0x4cc06d
sub eax, 2
je 0x4cc0a1
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005121be
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x4cc08a
push dword [esi + 0x4c]
push edi
push 1
push eax
call fcn.00535c15
add esp, 0x10
cmp edi, eax
jne 0x4cc057
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005121be
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
pop edi
xor ecx, ebp
pop esi
call fcn.005121be
mov esp, ebp
pop ebp
ret
Function at 0x4d1a90
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55d0a9
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push esi
push edi
mov eax, dword [0x5df7e4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x10], 0
push 8
mov dword [esi + 0x30], 0
mov dword [esi + 8], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0x201
mov dword [esi + 0x18], 6
mov dword [esi + 0x1c], 0
mov dword [esi + 0x20], 0
mov dword [esi + 0x24], 0
mov dword [esi + 0x28], 0
mov dword [esi + 0x2c], 0
mov dword [esi + 0xc], 0
call fcn.00511c4f
mov edi, eax
add esp, 4
test edi, edi
je 0x4d1b2d
push 1
call fcn.0050f679
add esp, 4
mov dword [edi + 4], eax
jmp 0x4d1b2f
xor edi, edi
mov eax, dword [ebp + 8]
mov dword [esi + 0x30], edi
mov dword [esi + 0x38], eax
mov dword [esi + 0x3c], 0
mov dword [ebp - 4], 0
mov eax, dword [esi + 0x30]
mov edi, dword [eax + 4]
mov ecx, edi
mov dword [ebp - 0x14], edi
mov eax, dword [edi]
call dword [eax + 4]
lea eax, [ebp - 0x18]
push eax
call fcn.004c5440
add esp, 4
mov ecx, eax
mov edx, dword [eax]
push 0x20
mov eax, dword [edx + 0x20]
call eax
mov bl, al
mov dword [ebp - 0x10], 0
mov dword [ebp - 4], 0xffffffff
test edi, edi
je 0x4d1b94
mov edx, dword [edi]
mov ecx, edi
call dword [edx + 8]
test eax, eax
je 0x4d1b94
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
cmp dword [esi + 0x38], 0
mov byte [esi + 0x40], bl
jne 0x4d1bb0
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 0x10]
and eax, 0x13
or eax, 4
mov dword [esi + 0xc], eax
and ecx, eax
jne 0x4d1bd3
cmp byte [ebp + 0xc], 0
je 0x4d1bbf
push esi
call fcn.0050faa1
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
test cl, 4
je 0x4d1bdf
mov esi, str.ios_base::badbit_set
jmp 0x4d1bef
test cl, 2
mov esi, str.ios_base::failbit_set
mov eax, str.ios_base::eofbit_set
cmove esi, eax
lea eax, [ebp - 0x18]
push 1
push eax
call fcn.004d1c20
add esp, 8
lea ecx, [ebp - 0x2c]
push eax
push esi
call fcn.004c6590
push 0x5c7918
lea eax, [ebp - 0x2c]
push eax
call fcn.00529368
int3
Function at 0x4d1ef0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x5df7e4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x4d1f20
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005121be
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
push edi
mov ecx, dword [eax]
test ecx, ecx
je 0x4d1f5c
mov edx, dword [esi + 0x30]
mov edi, dword [edx]
lea eax, [edi + ecx]
cmp ecx, eax
jae 0x4d1f5c
lea ecx, [edi - 1]
mov dword [edx], ecx
mov edx, dword [esi + 0x20]
mov esi, dword [edx]
lea ecx, [esi + 1]
mov dword [edx], ecx
mov byte [esi], bl
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005121be
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
je 0x4d2041
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x4d1f84
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
sub edx, ecx
mov dword [edi], ecx
mov eax, dword [esi + 0x1c]
mov dword [eax], ecx
mov eax, dword [esi + 0x2c]
mov dword [eax], edx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x4d1fb7
push dword [esi + 0x4c]
movsx eax, bl
push eax
call fcn.00535332
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005121be
mov esp, ebp
pop ebp
ret 4
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x28], bl
mov edx, dword [ecx]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x27]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [esi + 0x40]
push eax
call dword [edx + 0x1c]
test eax, eax
js 0x4d2041
cmp eax, 1
jle 0x4d2014
cmp eax, 3
jne 0x4d2041
push dword [esi + 0x4c]
push dword [ebp - 0x28]
call fcn.004c3f90
add esp, 8
or ecx, 0xffffffff
test al, al
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005121be
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x4d2031
push dword [esi + 0x4c]
push edi
push 1
push eax
call fcn.00535c15
add esp, 0x10
cmp edi, eax
jne 0x4d2041
lea eax, [ebp - 0x28]
mov byte [esi + 0x3d], 1
cmp dword [ebp - 0x30], eax
jne 0x4d1f47
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005121be
mov esp, ebp
pop ebp
ret 4
Function at 0x4d31d0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push edi
mov edi, ecx
cmp dword [edi + 0x38], 0
je 0x4d31f4
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.004d32c0
pop edi
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [edi + 0x1c]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov eax, dword [eax]
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x10], ebx
mov dword [ebp - 8], eax
test eax, eax
je 0x4d3215
mov eax, dword [edi + 0x2c]
mov eax, dword [eax]
jmp 0x4d3217
xor eax, eax
cdq
mov dword [ebp + 0x10], eax
mov ecx, edx
mov dword [ebp - 4], ecx
test ebx, ebx
jl 0x4d329f
jg 0x4d322a
test esi, esi
je 0x4d329f
test ecx, ecx
jl 0x4d326c
jg 0x4d3234
test eax, eax
je 0x4d326c
cmp ebx, ecx
jg 0x4d3246
jl 0x4d323e
cmp esi, eax
jae 0x4d3246
mov eax, esi
mov dword [ebp + 0x10], esi
mov dword [ebp - 4], ebx
push eax
push dword [ebp - 8]
push dword [ebp + 8]
call fcn.00529780
mov ecx, dword [ebp + 0x10]
add esp, 0xc
mov eax, dword [edi + 0x2c]
add dword [ebp + 8], ecx
sub esi, ecx
sbb ebx, dword [ebp - 4]
sub dword [eax], ecx
mov eax, dword [edi + 0x1c]
add dword [eax], ecx
jmp 0x4d3272
mov eax, dword [ebp + 8]
mov dword [ebp + 8], eax
test ebx, ebx
jl 0x4d329f
jg 0x4d327c
test esi, esi
je 0x4d329f
cmp dword [edi + 0x4c], 0
je 0x4d329f
mov ecx, edi
call fcn.004cf2e0
push dword [edi + 0x4c]
push esi
push 1
push dword [ebp + 8]
call fcn.00535602
add esp, 0x10
sub esi, eax
sbb ebx, 0
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x10]
sub eax, esi
pop esi
sbb edx, ebx
pop ebx
pop edi
mov esp, ebp
pop ebp
ret 0xc
Function at 0x4d3390
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
mov ebx, ecx
cmp dword [ebx + 0x38], 0
je 0x4d33b4
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.004d3470
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x20]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov eax, dword [eax]
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x10], edi
mov dword [ebp - 8], eax
test eax, eax
je 0x4d33d5
mov eax, dword [ebx + 0x30]
mov eax, dword [eax]
jmp 0x4d33d7
xor eax, eax
cdq
mov dword [ebp + 0x10], eax
mov ecx, edx
mov dword [ebp - 4], ecx
test edi, edi
jl 0x4d3454
jg 0x4d33ea
test esi, esi
je 0x4d3454
test ecx, ecx
jl 0x4d342e
jg 0x4d33f4
test eax, eax
je 0x4d342e
cmp edi, ecx
jg 0x4d3406
jl 0x4d33fe
cmp esi, eax
jae 0x4d3406
mov eax, esi
mov dword [ebp + 0x10], esi
mov dword [ebp - 4], edi
push eax
push dword [ebp + 8]
push dword [ebp - 8]
call fcn.00529780
mov ecx, dword [ebp + 0x10]
add esp, 0xc
mov edx, dword [ebp + 8]
mov eax, dword [ebx + 0x30]
add edx, ecx
sub esi, ecx
sbb edi, dword [ebp - 4]
sub dword [eax], ecx
mov eax, dword [ebx + 0x20]
add dword [eax], ecx
jmp 0x4d3431
mov edx, dword [ebp + 8]
test edi, edi
jl 0x4d3454
jg 0x4d343b
test esi, esi
je 0x4d3454
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x4d3454
push eax
push esi
push 1
push edx
call fcn.00535c15
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x10]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc