joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4cf2d0
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push 0xffffffffffffffff
push 0x5dab23
mov eax, dword fs:[0]
push eax
push ecx
push esi
push edi
mov eax, dword [0x62fda0]
xor eax, esp
push eax
lea eax, [esp + 0x10]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0xc], esi
mov eax, dword [esp + 0x20]
push eax
call fcn.004daca0
xor eax, eax
mov dword [esi], vtable.ZlayDatabase.0
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], eax
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], eax
mov dword [esi + 0x28], eax
mov dword [esi + 0x2c], eax
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], eax
mov dword [esi + 0x38], eax
mov dword [esi + 0x3c], eax
mov dword [esi + 0x40], eax
mov dword [esi + 0x44], eax
mov dword [esi + 0x48], eax
mov dword [esi + 0x4c], eax
mov dword [esi + 0x50], eax
mov dword [esi + 0x54], eax
mov dword [esi + 0x58], eax
mov dword [esi + 0x5c], eax
lea edi, [esi + 0x68]
mov dword [esi + 0x60], eax
mov ecx, edi
mov dword [esp + 0x18], 0
mov dword [esi + 0x64], eax
call fcn.005b6f00
xor ecx, ecx
xor edx, edx
mov byte [esp + 0x18], 1
mov dword [esi + 0x74], 0
mov word [esi + 0x78], cx
mov word [esi + 0x7a], dx
call fcn.005bc5c0
test eax, eax
jne 0x4cf385
mov eax, 0x5ecac2
push eax
mov ecx, edi
call fcn.005b7890
xor eax, eax
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], eax
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], eax
mov dword [esi + 0x28], eax
mov dword [esi + 0x2c], eax
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], eax
mov dword [esi + 0x38], eax
mov dword [esi + 0x3c], eax
mov dword [esi + 0x40], eax
mov dword [esi + 0x44], eax
mov dword [esi + 0x48], eax
mov dword [esi + 0x4c], eax
mov dword [esi + 0x50], eax
mov dword [esi + 0x54], eax
mov dword [esi + 0x58], eax
mov dword [esi + 0x5c], eax
mov dword [esi + 0x60], eax
mov ecx, esi
mov dword [esi + 0x64], eax
call fcn.004cf210
mov eax, esi
mov ecx, dword [esp + 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
add esp, 0x10
ret 4
Function at 0x4cff20
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x5dab48
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push ebp
push esi
push edi
mov eax, dword [0x62fda0]
xor eax, esp
push eax
lea eax, [esp + 0x24]
mov dword fs:[0], eax
mov esi, ecx
mov ebx, dword [esp + 0x34]
push ebx
lea ecx, [esp + 0x18]
xor ebp, ebp
call fcn.004dfec0
push 0x3a
lea ecx, [esp + 0x20]
mov dword [esp + 0x30], ebp
call fcn.004d8830
push eax
call dword [sym.imp.MSVCR90.dll_strchr]
add esp, 8
cmp eax, ebp
jne 0x4cff81
lea ecx, [esp + 0x1c]
call fcn.004d8830
jmp 0x4cff82
inc eax
push eax
call fcn.005b8a90
add esp, 4
test eax, eax
jne 0x4cffb4
push 0x4e6d
call fcn.005bbd50
add esp, 4
lea ecx, [esp + 0x14]
mov dword [esp + 0x2c], 0xffffffff
call fcn.004df300
xor eax, eax
jmp 0x4d003f
mov eax, dword [esp + 0x38]
push eax
mov ecx, esi
call fcn.004cf190
cmp word [esi + 0x78], bp
jne 0x4d001f
xor ecx, ecx
cmp dword [esp + 0x3c], ebp
sete cl
mov edi, ecx
push edi
push ebx
mov ecx, esi
call dword [esp + 0x48]
test eax, eax
je 0x4d0018
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x38]
push edx
push eax
mov ecx, esi
call fcn.004cf410
test eax, eax
je 0x4d0002
mov ecx, 1
mov dword [esi + 0x74], edi
mov word [esi + 0x78], cx
mov ebp, ecx
jmp 0x4d002c
push 1
mov ecx, esi
call fcn.004dcfb0
movzx edx, al
push edx
mov ecx, esi
call fcn.004dce40
jmp 0x4d002c
call fcn.004cee40
jmp 0x4d002c
push 0x4e31
call fcn.005bbd50
add esp, 4
lea ecx, [esp + 0x14]
mov dword [esp + 0x2c], 0xffffffff
call fcn.004df300
mov eax, ebp
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0x14
Function at 0x4d7ea0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x5db2b8
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x62fda0]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
mov ebp, ecx
mov esi, dword [esp + 0x40]
mov eax, dword [esi + 0xc]
mov ecx, eax
shr ecx, 3
test cl, 1
jne 0x4d8005
mov edx, eax
shr edx, 1
test dl, 1
je 0x4d7ef9
and eax, 0xfffffffc
mov dword [esi + 8], 0
mov dword [esi + 0xc], eax
jmp 0x4d8005
mov ecx, dword [esi]
mov edi, dword [esi + 8]
shr ecx, 1
mov dword [esp + 0x14], edi
cmp ecx, 0x7fffffff
jne 0x4d7f0f
or ecx, 0xffffffff
mov eax, dword [esi + 4]
push 0
push ecx
shr eax, 7
push eax
push ebp
lea ecx, [esp + 0x28]
call fcn.004e4800
mov edx, dword [esp + 0x18]
push 4
lea eax, [esp + 0x44]
push eax
mov eax, dword [edx]
lea ecx, [esp + 0x20]
mov dword [esp + 0x40], 0
call eax
push 1
lea ecx, [esp + 0x44]
push 4
push ecx
call fcn.004d9520
mov ecx, dword [esp + 0x4c]
mov eax, ecx
shr eax, 0x13
shl eax, 4
xor eax, dword [esi + 0xc]
and ecx, 0x7ffff
and eax, 0x1fff0
xor dword [esi + 0xc], eax
mov edx, dword [edi]
mov eax, dword [edx + 0x14]
mov ebx, ecx
add esp, 0xc
mov ecx, edi
call eax
mov ecx, edi
cmp ebx, eax
jne 0x4d7fd7
mov edx, dword [edi]
mov eax, dword [edx + 0x14]
call eax
mov ecx, dword [ebp + 8]
push eax
call fcn.004d9050
test byte [edi + 8], 1
mov ebx, eax
je 0x4d7fa5
mov ebp, dword [ebp + 0x14]
lea ecx, [esp + 0x14]
push ecx
lea ecx, [ebp + 0xc]
call fcn.004d7c60
mov edx, dword [edi]
mov eax, dword [edx + 0xc]
mov ecx, edi
call eax
and dword [esi + 0xc], 0xfffffffe
mov edx, dword [ebx + 0xc]
lea ecx, [esp + 0x18]
push ecx
push edi
call edx
add esp, 8
lea ecx, [esp + 0x18]
mov esi, eax
mov dword [esp + 0x38], 0xffffffff
call fcn.004e4920
mov eax, esi
jmp 0x4d8007
mov eax, dword [edi]
mov edx, dword [eax + 0xc]
call edx
mov ecx, dword [ebp + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 8]
push edi
call edx
and dword [esi + 0xc], 0xfffffffe
lea ecx, [esp + 0x18]
mov dword [esi + 8], 0
mov dword [esp + 0x38], 0xffffffff
call fcn.004e4920
xor eax, eax
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret 4
Function at 0x4d95f0
Capabilities:
Enumerate pe sections

Disassembly:
mov ecx, dword [0x630a04]
sub esp, 0x10
test ecx, ecx
je 0x4d9635
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
call edx
cmp eax, 0x14
jl 0x4d9635
push esi
push edi
lea eax, [esp + 8]
push str._ENTERING__member_copy__src_p__dst_p_
push eax
mov dword [esp + 0x10], str..._util.cpp
mov dword [esp + 0x14], 0x6c
mov dword [esp + 0x18], 0x14
call fcn.004e1a20
add esp, 0x10
mov ecx, dword [edi]
mov dword [esi], ecx
movzx edx, word [edi + 4]
mov dword [esi + 4], edx
mov eax, dword [edi + 0x10]
mov dword [esi + 8], eax
mov ecx, dword [edi + 0x14]
mov dword [esi + 0xc], ecx
mov edx, dword [edi + 0x18]
mov dword [esi + 0x10], edx
mov eax, dword [edi + 0x1c]
mov dword [esi + 0x14], eax
mov ecx, dword [edi + 0x20]
mov dword [esi + 0x18], ecx
movzx edx, word [edi + 6]
mov word [esi + 0x1c], dx
mov ax, word [edi + 8]
mov word [esi + 0x1e], ax
mov cx, word [edi + 0xa]
mov word [esi + 0x20], cx
movzx edx, word [edi + 0xc]
mov word [esi + 0x22], dx
mov ecx, dword [0x630a04]
test ecx, ecx
je 0x4d96bd
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
call edx
cmp eax, 0x28
jl 0x4d96bd
lea eax, [esp]
push str._EXITING__member_copy__
push eax
mov dword [esp + 8], str..._util.cpp
mov dword [esp + 0xc], 0x7a
mov dword [esp + 0x10], 0x28
call fcn.004e1a20
add esp, 8
add esp, 0x10
ret

Function at 0x4dadb0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x5db4d1
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
mov eax, dword [0x62fda0]
xor eax, esp
push eax
lea eax, [esp + 0x28]
mov dword fs:[0], eax
mov esi, dword [esp + 0x38]
push 0
lea ecx, [esp + 0x1c]
mov dword [esp + 0x10], 0
call fcn.004d8810
lea eax, [esp + 0x20]
push eax
lea ebx, [esp + 0x1c]
mov dword [esp + 0x34], 1
call fcn.004dacf0
add esp, 4
push 0
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x38], 2
call fcn.004d8b60
lea ecx, [esp + 0x20]
mov byte [esp + 0x30], 4
call fcn.004d8910
push 0x5f65b8
lea ecx, [esp + 0x14]
call fcn.004d8940
mov ecx, ebx
call fcn.004d8830
push eax
lea ecx, [esp + 0x14]
call fcn.004d8940
mov ecx, dword [esp + 0x3c]
push ecx
lea ecx, [esp + 0x14]
call fcn.004d8940
push 0
lea edx, [esp + 0x14]
push edx
mov ecx, esi
call fcn.004d8b60
mov eax, 1
lea ecx, [esp + 0x10]
mov dword [esp + 0xc], eax
mov byte [esp + 0x30], al
call fcn.004d8910
mov ecx, ebx
mov byte [esp + 0x30], 0
call fcn.004d8910
mov eax, esi
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
add esp, 0x28
ret
Function at 0x4dc7f0
Capabilities:
Get hostname
Initialize winsock library
Resolve dns

Disassembly:
push 0xffffffffffffffff
push 0x5db80e
mov eax, dword fs:[0]
push eax
sub esp, 0x298
mov eax, dword [0x62fda0]
xor eax, esp
mov dword [esp + 0x294], eax
push ebx
push esi
mov eax, dword [0x62fda0]
xor eax, esp
push eax
lea eax, [esp + 0x2a4]
mov dword fs:[0], eax
mov eax, dword [esp + 0x2b4]
mov esi, ecx
push eax
mov dword [esp + 0x10], esi
call fcn.004d73e0
xor ebx, ebx
push ebx
lea ecx, [esi + 0x1c]
mov dword [esp + 0x2b0], ebx
mov dword [esi], vtable.PzExtDatabaseInst.0
call fcn.004d8810
push ebx
lea ecx, [esi + 0x24]
mov byte [esp + 0x2b0], 1
call fcn.004d8810
push ebx
lea ecx, [esi + 0x2c]
mov byte [esp + 0x2b0], 2
call fcn.004d8810
push ebx
lea ecx, [esi + 0x34]
mov byte [esp + 0x2b0], 3
call fcn.004d8810
push ebx
lea ecx, [esi + 0x3c]
mov byte [esp + 0x2b0], 4
call fcn.004d8810
push ebx
lea ecx, [esi + 0x44]
mov byte [esp + 0x2b0], 5
call fcn.004d8810
push ebx
lea ecx, [esi + 0x4c]
mov byte [esp + 0x2b0], 6
call fcn.004d8810
push 0x2000
lea eax, [esi + 0x60]
push ebx
push eax
mov byte [esp + 0x2b8], 7
mov dword [esi + 0x58], 0xffffffff
call fcn.005bd874
add esp, 0xc
push ebx
lea ecx, [esi + 0x306c]
call fcn.004d8810
push ebx
lea ecx, [esi + 0x3074]
mov byte [esp + 0x2b0], 8
call fcn.004d8810
mov dword [esi + 0x3094], ebx
lea eax, [esi + 0x308c]
mov dword [eax + 4], eax
mov dword [eax], eax
mov ecx, dword [esi + 0x3084]
lea edx, [esp + 0x10]
and ecx, 0xffffffa2
push edx
or ecx, 0x22
push 0x101
mov dword [esi + 0x3084], ecx
mov byte [esi + 0x307c], 1
mov dword [esi + 0x3080], ebx
mov byte [esi + 0x3098], bl
mov dword [esi + 0x3088], 1
call sub.WSOCK32.dll_WSAStartup
cmp dword [0x6307e0], ebx
jne 0x4dc986
push 0x100
lea eax, [esp + 0x1a4]
push eax
call sub.WSOCK32.dll_gethostname
test eax, eax
jne 0x4dc986
lea ecx, [esp + 0x1a0]
push ecx
call sub.WSOCK32.dll_gethostbyname
cmp eax, ebx
je 0x4dc986
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
mov ecx, dword [eax]
mov dword [0x6307e0], ecx
mov eax, esi
mov ecx, dword [esp + 0x2a4]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov ecx, dword [esp + 0x294]
xor ecx, esp
call fcn.005bd2c6
add esp, 0x2a4
ret 4

Function at 0x4ddc00
Capabilities:
Encode data using xor

Disassembly:
mov ecx, dword [0x6309f8]
test ecx, ecx
je 0x4ddc98
push esi
xor esi, esi
cmp dword [ecx + 8], esi
jbe 0x4ddc4a
mov eax, dword [ecx]
mov edx, dword [eax + esi*8]
mov ecx, dword [edx + 8]
lea eax, [eax + esi*8]
movzx eax, byte [eax + 4]
add eax, eax
xor eax, dword [ecx + 0x3084]
push 0
and eax, 2
xor dword [ecx + 0x3084], eax
push edx
call fcn.004dcab0
mov ecx, dword [0x6309f8]
inc esi
cmp esi, dword [ecx + 8]
jb 0x4ddc16
push 0
mov esi, ecx
call fcn.004ddb30
cmp dword [esi + 4], 0
jbe 0x4ddc70
push edi
mov edi, dword [esi]
push esi
call fcn.004d8f00
mov edx, dword [eax]
add esp, 4
mov ecx, eax
mov eax, dword [edx + 8]
push edi
call eax
pop edi
push esi
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
call sub.MSVCR90.dll_void___cdecl_operator_delete_void__
add esp, 4
mov dword [0x6309f8], 0
pop esi
ret
Function at 0x4df130
Capabilities:
Resolve dns
Set socket configuration

Disassembly:
mov ecx, dword [0x630a04]
sub esp, 0x10
test ecx, ecx
je 0x4df17f
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
call edx
cmp eax, 0x14
jl 0x4df17f
mov eax, edi
test edi, edi
jne 0x4df154
mov eax, str._null_
push eax
lea eax, [esp + 4]
push str._ENTERING__GetInAddr_name_s_
push eax
mov dword [esp + 0xc], str..._xpathmake.cpp
mov dword [esp + 0x10], 0x33b
mov dword [esp + 0x14], 0x14
call fcn.004e1a20
add esp, 0xc
push esi
push edi
call sub.WSOCK32.dll_inet_addr
mov esi, eax
cmp esi, 0xffffffff
jne 0x4df19e
push edi
call sub.WSOCK32.dll_gethostbyname
test eax, eax
je 0x4df19e
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov esi, dword [edx]
mov ecx, dword [0x630a04]
test ecx, ecx
je 0x4df1df
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
call edx
cmp eax, 0x28
jl 0x4df1df
push esi
lea eax, [esp + 8]
push str._EXITING__GetInAddr__:__x
push eax
mov dword [esp + 0x10], str..._xpathmake.cpp
mov dword [esp + 0x14], 0x365
mov dword [esp + 0x18], 0x28
call fcn.004e1a20
add esp, 0xc
mov eax, esi
pop esi
add esp, 0x10
ret

Function at 0x4dfcb0
Capabilities:
Query environment variable

Disassembly:
push 0xffffffffffffffff
push 0x5dbd1b
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push esi
push edi
mov eax, dword [0x62fda0]
xor eax, esp
push eax
lea eax, [esp + 0x20]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0xc], esi
xor edi, edi
push edi
call fcn.004d8810
mov dword [esp + 0x28], edi
mov dword [esi + 8], edi
mov dword [esi + 0xc], edi
mov dword [esi + 0x10], edi
mov ecx, dword [0x630a04]
mov byte [esp + 0x28], 1
cmp ecx, edi
je 0x4dfd35
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
call edx
cmp eax, 0x14
jl 0x4dfd35
lea eax, [esp + 0x10]
push str._ENTERING__PzExtServerRepl::PzExtServerRepl__
push eax
mov dword [esp + 0x18], str..._xpathmake.cpp
mov dword [esp + 0x1c], 0x375
mov dword [esp + 0x20], 0x14
call fcn.004e1a20
add esp, 8
push str.ZDEFAULT_SERVER
call dword [sym.imp.MSVCR90.dll_getenv]
add esp, 4
cmp eax, edi
je 0x4dfd76
push edi
push eax
lea ecx, [esp + 0x18]
call fcn.004d8b90
lea ecx, [esp + 0x10]
mov byte [esp + 0x28], 2
call fcn.004d8830
push eax
mov ecx, esi
call fcn.004dfa40
lea ecx, [esp + 0x10]
mov byte [esp + 0x28], 1
call fcn.004d8910
mov ecx, dword [0x630a04]
cmp ecx, edi
je 0x4dfdb6
mov edx, dword [ecx]
mov eax, dword [edx + 0xc]
call eax
cmp eax, 0x28
jl 0x4dfdb6
lea ecx, [esp + 0x10]
push str._EXITING__PzExtServerRepl::PzExtServerRepl__
push ecx
mov dword [esp + 0x18], str..._xpathmake.cpp
mov dword [esp + 0x1c], 0x37c
mov dword [esp + 0x20], 0x28
call fcn.004e1a20
add esp, 8
mov eax, esi
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
add esp, 0x20
ret
Function at 0x4e28b0
Capabilities:
Query environment variable
Read file on windows

Disassembly:
sub esp, 0x10
push ebx
mov ebx, dword [esp + 0x18]
push ebp
push esi
mov esi, ecx
mov ecx, dword [0x630a04]
test ecx, ecx
je 0x4e2914
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
call edx
cmp eax, 0x14
jl 0x4e2914
mov eax, ebx
test ebx, ebx
jne 0x4e28dd
mov eax, str._NULL_
mov ecx, dword [esp + 0x28]
mov ebp, dword [esp + 0x24]
push ecx
push ebp
push eax
lea edx, [esp + 0x18]
push str._ENTERING__PzLocalFile::Open__filename_s__flags_u__mask_u_
push edx
mov dword [esp + 0x20], str..._osfile.cpp
mov dword [esp + 0x24], 0x124
mov dword [esp + 0x28], 0x14
call fcn.004e1a20
add esp, 0x14
jmp 0x4e2918
mov ebp, dword [esp + 0x24]
cmp byte [esi + 8], 0
je 0x4e2927
mov eax, dword [esi]
mov edx, dword [eax + 8]
mov ecx, esi
call edx
mov eax, ebp
and eax, 0x10
or eax, 0x801
add eax, eax
mov ecx, ebp
and ecx, 0xc0
or eax, ecx
push edi
add eax, eax
add eax, eax
mov edi, ebp
push 0x180
add eax, eax
and edi, 2
or eax, edi
push 0x40
push eax
push ebx
call dword [sym.imp.MSVCR90.dll__sopen]
add esp, 0x10
mov dword [esi + 0x10], eax
cmp eax, 0xffffffff
jne 0x4e29b8
mov ecx, dword [0x630a04]
test ecx, ecx
je 0x4e29b8
mov edx, dword [ecx]
mov eax, dword [edx + 0xc]
call eax
cmp eax, 0xa
jl 0x4e29b8
test ebx, ebx
jne 0x4e2984
mov ebx, str._null_
mov dword [esp + 0x10], str..._osfile.cpp
mov dword [esp + 0x14], 0x13f
mov dword [esp + 0x18], 0xa
call dword [sym.imp.MSVCR90.dll__errno]
mov ecx, dword [eax]
push ecx
push ebx
lea edx, [esp + 0x18]
push str.FAILED:_sopen_filename_s_:__d
push edx
call fcn.004e1a20
add esp, 0x10
mov al, byte [0x630a08]
test al, al
jne 0x4e29e5
push str.ZPOS_DREAD
call dword [sym.imp.MSVCR90.dll_getenv]
add esp, 4
test eax, eax
je 0x4e29dc
mov byte [0x630a08], 1
jmp 0x4e29e9
mov byte [0x630a08], 0xff
jmp 0x4e2a4e
cmp al, 1
jne 0x4e2a4e
mov eax, dword [esi + 0x10]
cmp eax, 0xffffffff
je 0x4e2a4e
test edi, edi
jne 0x4e2a4e
push 2
push edi
push eax
call dword [sym.imp.MSVCR90.dll__lseek]
push 0x100000
mov ebp, eax
call sub.MSVCR90.dll_void____cdecl_operator_new___unsigned_int_
add esp, 0x10
xor ebx, ebx
mov edi, eax
test ebp, ebp
jbe 0x4e2a33
mov eax, dword [esi + 0x10]
push 0x100000
push edi
push eax
call dword [sym.imp.MSVCR90.dll__read]
add esp, 0xc
test eax, eax
jle 0x4e2a33
add ebx, eax
cmp ebx, ebp
jb 0x4e2a16
push edi
call sub.MSVCR90.dll_void___cdecl_operator_delete_void__
mov ecx, dword [esi + 0x10]
push 0
push 0
push ecx
call dword [sym.imp.MSVCR90.dll__lseek]
mov ebp, dword [esp + 0x38]
add esp, 0x10
xor bl, bl
cmp dword [esi + 0x10], 0xffffffff
pop edi
je 0x4e2a62
mov dword [esi + 4], ebp
mov byte [esi + 8], 1
mov bl, 1
jmp 0x4e2a6e
add esi, 0xc
push esi
call fcn.004ddec0
add esp, 4
mov ecx, dword [0x630a04]
test ecx, ecx
je 0x4e2ab2
mov edx, dword [ecx]
mov eax, dword [edx + 0xc]
call eax
cmp eax, 0x28
jl 0x4e2ab2
movzx ecx, bl
push ecx
lea edx, [esp + 0x10]
push str._ENTERING__PzLocalFile::Open__:__d
push edx
mov dword [esp + 0x18], str..._osfile.cpp
mov dword [esp + 0x1c], 0x17f
mov dword [esp + 0x20], 0x28
call fcn.004e1a20
add esp, 0xc
pop esi
pop ebp
mov al, bl
pop ebx
add esp, 0x10
ret 0xc
Function at 0x4e28b9
Capabilities:
Query environment variable
Read file on windows

Disassembly:
sub esp, 0x10
push ebx
mov ebx, dword [esp + 0x18]
push ebp
push esi
mov esi, ecx
mov ecx, dword [0x630a04]
test ecx, ecx
je 0x4e2914
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
call edx
cmp eax, 0x14
jl 0x4e2914
mov eax, ebx
test ebx, ebx
jne 0x4e28dd
mov eax, str._NULL_
mov ecx, dword [esp + 0x28]
mov ebp, dword [esp + 0x24]
push ecx
push ebp
push eax
lea edx, [esp + 0x18]
push str._ENTERING__PzLocalFile::Open__filename_s__flags_u__mask_u_
push edx
mov dword [esp + 0x20], str..._osfile.cpp
mov dword [esp + 0x24], 0x124
mov dword [esp + 0x28], 0x14
call fcn.004e1a20
add esp, 0x14
jmp 0x4e2918
mov ebp, dword [esp + 0x24]
cmp byte [esi + 8], 0
je 0x4e2927
mov eax, dword [esi]
mov edx, dword [eax + 8]
mov ecx, esi
call edx
mov eax, ebp
and eax, 0x10
or eax, 0x801
add eax, eax
mov ecx, ebp
and ecx, 0xc0
or eax, ecx
push edi
add eax, eax
add eax, eax
mov edi, ebp
push 0x180
add eax, eax
and edi, 2
or eax, edi
push 0x40
push eax
push ebx
call dword [sym.imp.MSVCR90.dll__sopen]
add esp, 0x10
mov dword [esi + 0x10], eax
cmp eax, 0xffffffff
jne 0x4e29b8
mov ecx, dword [0x630a04]
test ecx, ecx
je 0x4e29b8
mov edx, dword [ecx]
mov eax, dword [edx + 0xc]
call eax
cmp eax, 0xa
jl 0x4e29b8
test ebx, ebx
jne 0x4e2984
mov ebx, str._null_
mov dword [esp + 0x10], str..._osfile.cpp
mov dword [esp + 0x14], 0x13f
mov dword [esp + 0x18], 0xa
call dword [sym.imp.MSVCR90.dll__errno]
mov ecx, dword [eax]
push ecx
push ebx
lea edx, [esp + 0x18]
push str.FAILED:_sopen_filename_s_:__d
push edx
call fcn.004e1a20
add esp, 0x10
mov al, byte [0x630a08]
test al, al
jne 0x4e29e5
push str.ZPOS_DREAD
call dword [sym.imp.MSVCR90.dll_getenv]
add esp, 4
test eax, eax
je 0x4e29dc
mov byte [0x630a08], 1
jmp 0x4e29e9
mov byte [0x630a08], 0xff
jmp 0x4e2a4e
cmp al, 1
jne 0x4e2a4e
mov eax, dword [esi + 0x10]
cmp eax, 0xffffffff
je 0x4e2a4e
test edi, edi
jne 0x4e2a4e
push 2
push edi
push eax
call dword [sym.imp.MSVCR90.dll__lseek]
push 0x100000
mov ebp, eax
call sub.MSVCR90.dll_void____cdecl_operator_new___unsigned_int_
add esp, 0x10
xor ebx, ebx
mov edi, eax
test ebp, ebp
jbe 0x4e2a33
mov eax, dword [esi + 0x10]
push 0x100000
push edi
push eax
call dword [sym.imp.MSVCR90.dll__read]
add esp, 0xc
test eax, eax
jle 0x4e2a33
add ebx, eax
cmp ebx, ebp
jb 0x4e2a16
push edi
call sub.MSVCR90.dll_void___cdecl_operator_delete_void__
mov ecx, dword [esi + 0x10]
push 0
push 0
push ecx
call dword [sym.imp.MSVCR90.dll__lseek]
mov ebp, dword [esp + 0x38]
add esp, 0x10
xor bl, bl
cmp dword [esi + 0x10], 0xffffffff
pop edi
je 0x4e2a62
mov dword [esi + 4], ebp
mov byte [esi + 8], 1
mov bl, 1
jmp 0x4e2a6e
add esi, 0xc
push esi
call fcn.004ddec0
add esp, 4
mov ecx, dword [0x630a04]
test ecx, ecx
je 0x4e2ab2
mov edx, dword [ecx]
mov eax, dword [edx + 0xc]
call eax
cmp eax, 0x28
jl 0x4e2ab2
movzx ecx, bl
push ecx
lea edx, [esp + 0x10]
push str._ENTERING__PzLocalFile::Open__:__d
push edx
mov dword [esp + 0x18], str..._osfile.cpp
mov dword [esp + 0x1c], 0x17f
mov dword [esp + 0x20], 0x28
call fcn.004e1a20
add esp, 0xc
pop esi
pop ebp
mov al, bl
pop ebx
add esp, 0x10
ret 0xc
Function at 0x4e2ddd
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x10
push ebx
mov ebx, dword [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x1c]
push esi
mov esi, ecx
mov ecx, dword [0x630a04]
push edi
mov edi, dword [esp + 0x2c]
test ecx, ecx
je 0x4e2e28
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
call edx
cmp eax, 0x14
jl 0x4e2e28
push edi
push ebx
push ebp
lea eax, [esp + 0x1c]
push str._ENTERING__PzLocalFile::Read__pos_u__buf_p__n_u_
push eax
mov dword [esp + 0x24], str..._osfile.cpp
mov dword [esp + 0x28], 0x1b8
mov dword [esp + 0x2c], 0x14
call fcn.004e1a20
add esp, 0x14
mov edx, dword [esi]
mov eax, dword [edx + 0x10]
push ebp
mov ecx, esi
call eax
test al, al
je 0x4e2ef5
mov ecx, dword [esi + 0x10]
push edi
push ebx
push ecx
call dword [sym.imp.MSVCR90.dll__read]
mov esi, eax
add esp, 0xc
test esi, esi
jg 0x4e2e9c
mov ecx, dword [0x630a04]
test ecx, ecx
je 0x4e2ee4
mov edx, dword [ecx]
mov eax, dword [edx + 0xc]
call eax
cmp eax, 0xa
jl 0x4e2e9c
mov dword [esp + 0x10], str..._osfile.cpp
mov dword [esp + 0x14], 0x1be
mov dword [esp + 0x18], 0xa
call dword [sym.imp.MSVCR90.dll__errno]
mov ecx, dword [eax]
push ecx
lea edx, [esp + 0x14]
push str.FAILED:_read:__d
push edx
call fcn.004e1a20
add esp, 0xc
mov ecx, dword [0x630a04]
test ecx, ecx
je 0x4e2ee4
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
call edx
cmp eax, 0x28
jl 0x4e2ee4
xor eax, eax
cmp esi, edi
sete al
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], str..._osfile.cpp
mov dword [esp + 0x14], 0x1c1
mov dword [esp + 0x18], 0x28
push eax
push str._EXITING__PzLocalFile::Read__:__d
push ecx
call fcn.004e1a20
add esp, 0xc
xor eax, eax
cmp esi, edi
pop edi
pop esi
pop ebp
sete al
pop ebx
add esp, 0x10
ret 0xc
mov ecx, dword [0x630a04]
test ecx, ecx
je 0x4e2f37
mov edx, dword [ecx]
mov eax, dword [edx + 0xc]
call eax
cmp eax, 0x28
jl 0x4e2f37
push 0
lea ecx, [esp + 0x14]
push str._EXITING__PzLocalFile::Read__:__d
push ecx
mov dword [esp + 0x1c], str..._osfile.cpp
mov dword [esp + 0x20], 0x1c5
mov dword [esp + 0x24], 0x28
call fcn.004e1a20
add esp, 0xc
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x10
ret 0xc