joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1003b730
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x10087040]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x1003b7f4
cmp byte [esi + 0x3e], 0
je 0x1003b7f4
mov eax, dword [esi]
push edi
push 0xffff
call dword [eax + 0xc]
mov ecx, 0xffff
cmp cx, ax
je 0x1003b7e2
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_wchar_t__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, 0
je 0x1003b7a9
sub eax, 1
je 0x1003b7ad
sub eax, 2
jne 0x1003b7e2
mov byte [esi + 0x3e], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10052757
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3e], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x1003b7cb
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x1003b7e2
cmp byte [esi + 0x3e], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10052757
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10052757
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.10052757
mov esp, ebp
pop ebp
ret
Function at 0x1003c100
Capabilities:
Initialize winsock library

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10056f46
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x1bc
mov eax, dword [0x10087040]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
push 0
lea eax, [ebp - 0x18]
push eax
push 0
push 0x1008a5d0
call dword [sym.imp.KERNEL32.dll_InitOnceBeginInitialize]
test eax, eax
jne 0x1003c15f
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_abort]
cmp dword [ebp - 0x18], 0
je 0x1003c22f
mov dword [ebp - 0x1c8], 0x1008a5d0
mov dword [ebp - 0x1c4], 4
push 1
mov dword [ebp - 4], 0
call fcn.100401e0
add esp, 4
test eax, eax
je 0x1003c211
push 0x19
xorps xmm0, xmm0
mov dword [ebp - 0x1b0], 0
push str.ares_library_init_failed.
lea ecx, [ebp - 0x1c0]
mov dword [ebp - 0x1ac], 0
movups xmmword [ebp - 0x1c0], xmm0
call fcn.10008fe0
lea ecx, [ebp - 0x1c0]
mov byte [ebp - 4], 1
call fcn.1003a470
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x1ac]
cmp ecx, 0xf
jbe 0x1003c211
mov edx, dword [ebp - 0x1c0]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x1003c207
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x1003c207
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.10052765
add esp, 8
push 0
push 0
push 0x1008a5d0
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_InitOnceComplete]
test eax, eax
je 0x1003c2e2
lea eax, [ebp - 0x1a8]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x1003c2c3
push 0x12
xorps xmm0, xmm0
mov dword [ebp - 0x1b0], 0
push str.WSAStartup_failed.
lea ecx, [ebp - 0x1c0]
mov dword [ebp - 0x1ac], 0
movups xmmword [ebp - 0x1c0], xmm0
call fcn.10008fe0
lea ecx, [ebp - 0x1c0]
mov dword [ebp - 4], 2
call fcn.1003a470
mov ecx, dword [ebp - 0x1ac]
cmp ecx, 0xf
jbe 0x1003c2c3
mov edx, dword [ebp - 0x1c0]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x1003c2b9
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x1003c2b9
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.10052765
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.10052757
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
int3
Function at 0x1003ca40
Capabilities:
Create thread
Encode data using xor
Hash data using fnv

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10057034
mov eax, dword fs:[0]
push eax
sub esp, 0x10
mov eax, dword [0x10087040]
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 edi, ecx
cmp dword [0x100871cc], 0xf
mov esi, 0x100871b8
mov ebx, dword [0x100871c8]
mov edx, 0x811c9dc5
cmova esi, dword [0x100871b8]
xor ecx, ecx
test ebx, ebx
je 0x1003caa2
movzx eax, byte [esi + ecx]
inc ecx
xor eax, edx
imul edx, eax, 0x1000193
cmp ecx, ebx
jb 0x1003ca91
push edx
push 0x100871b8
lea eax, [ebp - 0x1c]
push eax
call fcn.1003f5e0
mov ecx, dword [0x1008a6b4]
mov eax, dword [eax + 4]
test eax, eax
cmovne ecx, eax
cmp ecx, dword [0x1008a6b4]
je 0x1003caed
push 0x100871b8
call fcn.1003ec80
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov dword [edi + 4], eax
mov dword [edi], ecx
movzx eax, ax
test ecx, ecx
je 0x1003caf9
test ax, ax
jne 0x1003cb7a
jmp 0x1003caf9
xor eax, eax
mov dword [edi], 0
mov word [edi + 4], ax
push 0x1c
call fcn.10052796
mov esi, eax
add esp, 4
mov dword [ebp - 0x14], esi
push 0x100871b8
mov ecx, esi
mov dword [ebp - 4], 0
call fcn.10018120
mov dword [esi + 0x18], fcn.1003d400
mov dword [ebp - 0x14], esi
lea eax, [ebp - 0x18]
mov dword [ebp - 4], 1
push eax
push 0
push esi
push 0x1003fd50
push 0
push 0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
add esp, 0x18
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x1003cba0
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], 0
call fcn.1003fa50
mov dword [ebp - 4], 2
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x1003cb98
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.MSVCP140.dll__Thrd_detach]
add esp, 8
test eax, eax
jne 0x1003cb98
mov eax, edi
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.10052757
mov esp, ebp
pop ebp
ret
push 1
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
push 6
mov dword [ebp - 0x18], 0
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
int3
Function at 0x1003edd0
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100573a5
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x10087040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edx, dword [ebp + 0xc]
mov edi, edx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x10], edx
cmp dword [edx + 0x14], 0xf
jbe 0x1003ee0b
mov edi, dword [edx]
xor ecx, ecx
mov esi, 0x811c9dc5
cmp dword [edx + 0x10], ecx
jbe 0x1003ee29
movzx eax, byte [edi + ecx]
inc ecx
xor eax, esi
imul esi, eax, 0x1000193
cmp ecx, dword [edx + 0x10]
jb 0x1003ee17
push esi
push edx
lea eax, [ebp - 0x18]
push eax
call fcn.1003f5e0
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x1003ee46
mov dword [ebx], eax
mov byte [ebx + 4], 0
jmp 0x1003efb2
cmp dword [0x1008a6b8], 0x6666666
jne 0x1003ee5d
push str.unordered_map_set_too_long
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xlength_error_char_const__]
mov dword [ebp - 0x20], 0x1008a6b4
mov dword [ebp - 4], 0
push 0x28
mov dword [ebp - 0x1c], 0
call fcn.10052796
add esp, 4
mov edi, eax
mov dword [ebp - 0x1c], edi
push dword [ebp - 0x10]
lea ecx, [edi + 8]
call fcn.10018120
xor ecx, ecx
mov dword [edi + 0x20], 0
mov word [edi + 0x24], cx
mov dword [ebp - 4], 1
mov edx, dword [0x1008a6b8]
lea eax, [edx + 1]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x1007e640]
mov eax, dword [0x1008a6cc]
cvtpd2ps xmm2, xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
movaps xmm1, xmm2
addsd xmm0, qword [eax*8 + 0x1007e640]
cvtpd2ps xmm0, xmm0
divss xmm1, xmm0
movss xmm0, dword [0x1008a6b0]
comiss xmm1, xmm0
jbe 0x1003ef61
divss xmm2, xmm0
sub esp, 8
cvtps2pd xmm0, xmm2
movsd qword [ebp - 0x18], xmm0
fld qword [ebp - 0x18]
fstp qword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll_ceil
fstp qword [ebp - 0x18]
movsd xmm0, qword [ebp - 0x18]
add esp, 8
cvtpd2ps xmm0, xmm0
call fcn.10053080
mov ecx, 8
cmp eax, ecx
cmova ecx, eax
mov eax, dword [0x1008a6cc]
cmp eax, ecx
jae 0x1003ef43
cmp eax, 0x200
jae 0x1003ef41
shl eax, 3
cmp eax, ecx
jae 0x1003ef43
mov eax, ecx
push eax
call fcn.1003f100
push esi
lea eax, [edi + 8]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.1003f5e0
mov edx, dword [0x1008a6b8]
mov ecx, dword [eax]
jmp 0x1003ef64
mov ecx, dword [ebp - 0x18]
mov eax, dword [ecx + 4]
inc edx
mov dword [0x1008a6b8], edx
mov dword [edi], ecx
mov dword [edi + 4], eax
mov dword [eax], edi
mov dword [ecx + 4], edi
and esi, dword [0x1008a6c8]
mov dword [ebp - 0x10], eax
mov eax, dword [0x1008a6bc]
mov edx, dword [eax + esi*8]
cmp edx, dword [0x1008a6b4]
jne 0x1003ef96
mov dword [eax + esi*8], edi
jmp 0x1003efa8
cmp edx, ecx
jne 0x1003ef9f
mov dword [eax + esi*8], edi
jmp 0x1003efac
mov ecx, dword [ebp - 0x10]
cmp dword [eax + esi*8 + 4], ecx
jne 0x1003efac
mov dword [eax + esi*8 + 4], edi
mov dword [ebx], edi
mov byte [ebx + 4], 1
mov eax, ebx
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
Function at 0x10040450
Capabilities:
Get hostname

Disassembly:
sub esp, 0x20
mov eax, dword [0x10087040]
xor eax, esp
mov dword [esp + 0x1c], eax
push ebx
push esi
mov esi, dword [esp + 0x2c]
xor ebx, ebx
push edi
xor edi, edi
mov dword [esp + 0xc], ebx
test byte [esi + 0x44], 1
jne 0x10040479
mov dword [esi], 0x100
cmp dword [esi + 0x38], ebx
jne 0x10040485
mov dword [esi + 0x38], 0x4d0
cmp dword [esi + 4], ebx
jne 0x10040491
mov dword [esi + 4], 0x7d0
cmp dword [esi + 8], ebx
jne 0x1004049d
mov dword [esi + 8], 3
push dword [esi + 0x84]
call fcn.10044010
add esp, 4
test eax, eax
jne 0x1004053a
test dword [esi], 0x200
je 0x100404d2
pop edi
pop esi
mov eax, 0x1a
pop ebx
mov ecx, dword [esp + 0x1c]
xor ecx, esp
call fcn.10052757
add esp, 0x20
ret
push 0x7f000001
mov dword [esp + 0x18], 2
call dword [sym.imp.WS2_32.dll_htonl]
push 0
push 0
mov dword [esp + 0x20], eax
lea eax, [esp + 0x1c]
push 0
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.100408b0
add esp, 0x14
test eax, eax
jne 0x10040645
push eax
push dword [esp + 0x10]
push esi
call fcn.10040c50
push dword [esp + 0x18]
mov ebx, eax
call fcn.10043980
add esp, 0x10
test ebx, ebx
je 0x1004053a
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [esp + 0x1c]
xor ecx, esp
call fcn.10052757
add esp, 0x20
ret
push ebp
cmp dword [esi + 0x28], edi
jne 0x10040607
mov ebp, 0x40
mov dword [esi + 0x28], edi
push ebp
mov dword [esp + 0x18], ebp
call dword [section..data]
mov edi, eax
add esp, 4
test edi, edi
jne 0x10040576
lea eax, [ebp - 0x31]
pop ebp
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1c]
xor ecx, esp
call fcn.10052757
add esp, 0x20
ret
push ebp
push edi
call dword [sym.imp.WS2_32.dll_gethostname]
cmp eax, 0xffffffff
jne 0x100405af
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x271e
jne 0x100405b3
mov eax, dword [esp + 0x14]
add ebp, ebp
add eax, eax
push eax
push edi
mov dword [esp + 0x1c], eax
call dword [0x10087004]
add esp, 8
test eax, eax
je 0x100405d9
mov edi, eax
jmp 0x10040576
test eax, eax
je 0x100405b6
mov byte [edi], 0
push 0x2e
push edi
call sub.VCRUNTIME140.dll_strchr
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x10040607
push 4
call dword [section..data]
add esp, 4
mov dword [esi + 0x24], eax
test eax, eax
jne 0x100405e0
mov ebx, 0xf
jmp 0x10040634
lea eax, [ebp + 1]
push eax
call fcn.100446b0
mov ecx, dword [esi + 0x24]
add esp, 4
mov dword [ecx], eax
mov eax, dword [esi + 0x24]
cmp dword [eax], 0
jne 0x10040600
mov ebx, 0xf
jmp 0x10040634
mov dword [esi + 0x28], 1
cmp dword [esi + 0x30], 0
jne 0x10040614
mov dword [esi + 0x2c], 0
cmp dword [esi + 0x34], 0
jne 0x10040634
push 0x100585e0
call fcn.100446b0
add esp, 4
mov dword [esi + 0x34], eax
test eax, eax
mov ecx, 0xf
cmove ebx, ecx
test edi, edi
je 0x10040642
push edi
call dword [0x10087008]
add esp, 4
mov eax, ebx
pop ebp
mov ecx, dword [esp + 0x28]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.10052757
add esp, 0x20
ret
Function at 0x10044a70
Capabilities:
Generate random numbers via rtlgenrandom
Read file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push ebp
mov ebp, dword [esp + 0x14]
push esi
push edi
mov edi, dword [esp + 0x20]
mov eax, dword [ebx]
xor esi, esi
sub eax, 1
je 0x10044b70
sub eax, 1
je 0x10044b1c
sub eax, 2
jne 0x10044b50
mov ecx, dword [ebx + 0x10c]
mov eax, dword [ebx + 0x108]
mov dword [esp + 0x10], ecx
test edi, edi
je 0x10044b0a
inc eax
movzx eax, al
mov dword [esp + 0x18], eax
mov ebp, dword [esp + 0x18]
mov cl, byte [eax + ebx + 8]
mov eax, dword [esp + 0x10]
movzx edx, cl
add eax, edx
movzx eax, al
mov dword [esp + 0x10], eax
movzx eax, byte [eax + ebx + 8]
mov byte [ebx + ebp + 8], al
mov eax, dword [esp + 0x10]
mov byte [eax + ebx + 8], cl
mov eax, ebp
mov ebp, dword [esp + 0x1c]
movzx eax, byte [eax + ebx + 8]
add eax, edx
movzx eax, al
movzx eax, byte [eax + ebx + 8]
mov byte [esi + ebp], al
inc esi
mov eax, dword [esp + 0x18]
cmp esi, edi
jb 0x10044ab4
mov ecx, dword [esp + 0x10]
pop edi
pop esi
pop ebp
mov dword [ebx + 0x108], eax
mov dword [ebx + 0x10c], ecx
pop ebx
pop ecx
ret
push dword [ebx + 8]
push edi
push 1
push ebp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
add esp, 0x10
test eax, eax
je 0x10044b50
nop
add esi, eax
cmp esi, edi
je 0x10044b77
push dword [ebx + 8]
mov eax, edi
sub eax, esi
push eax
lea eax, [esi + ebp]
push 1
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
add esp, 0x10
test eax, eax
jne 0x10044b30
mov eax, dword [ebx]
sub eax, 2
jne 0x10044b62
push dword [ebx + 8]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
add esp, 4
push ebx
call fcn.100447b0
add esp, 4
jmp 0x10044a81
push edi
push ebp
call sub.ADVAPI32.dll_SystemFunction036
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0x100453a0
Capabilities:
Query or enumerate registry value

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0x14]
lea eax, [esp + 4]
push eax
push 0
push 0
push 0
push dword [esp + 0x20]
mov dword [esp + 0x18], 0
push dword [esp + 0x20]
mov dword [esi], 0
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x100453d8
cmp eax, 0xea
jne 0x10045435
mov eax, dword [esp + 4]
test eax, eax
je 0x10045435
inc eax
push eax
call dword [section..data]
add esp, 4
mov dword [esi], eax
test eax, eax
je 0x10045435
lea ecx, [esp + 4]
push ecx
push eax
push 0
push 0
push dword [esp + 0x20]
push dword [esp + 0x20]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x10045424
mov ecx, dword [esp + 4]
cmp ecx, 1
je 0x10045424
mov eax, dword [esi]
pop esi
mov byte [ecx + eax], 0
mov eax, 1
pop ecx
ret
push dword [esi]
call dword [0x10087008]
add esp, 4
mov dword [esi], 0
xor eax, eax
pop esi
pop ecx
ret
Function at 0x10045a00
Capabilities:
Query environment variable

Disassembly:
push esi
push edi
push str.LOCALDOMAIN
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
add esp, 4
test eax, eax
je 0x10045a49
push eax
call fcn.100446b0
mov esi, eax
add esp, 4
test esi, esi
jne 0x10045a28
pop edi
lea eax, [esi + 0xf]
pop esi
ret
push 1
push esi
push dword [esp + 0x14]
call fcn.10045a70
push esi
mov edi, eax
call dword [0x10087008]
add esp, 0x10
test edi, edi
je 0x10045a49
mov eax, edi
pop edi
pop esi
ret
push str.RES_OPTIONS
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
add esp, 4
test eax, eax
je 0x10045a6a
push eax
push dword [esp + 0x10]
call fcn.10045b20
add esp, 8
pop edi
pop esi
ret
pop edi
xor eax, eax
pop esi
ret

Function at 0x10046830
Capabilities:
Create thread

Disassembly:
push ebx
mov ebx, dword [esp + 0xc]
push edi
test ebx, ebx
je 0x1004689b
mov edi, dword [esp + 0xc]
test edi, edi
je 0x1004689b
push esi
push 0x14
call fcn.10040230
mov esi, eax
add esp, 4
test esi, esi
jne 0x1004685a
lea eax, [esi + 0xf]
pop esi
pop edi
pop ebx
ret
mov eax, dword [esp + 0x18]
mov dword [esi + 0xc], eax
lea eax, [esi + 4]
push eax
push 0
push esi
push 0x100468b0
push 0
push 0
mov dword [esi + 8], ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi], eax
test eax, eax
jne 0x10046893
push esi
call dword [0x10087008]
add esp, 4
mov eax, 3
pop esi
pop edi
pop ebx
ret
mov dword [edi], esi
xor eax, eax
pop esi
pop edi
pop ebx
ret
pop edi
mov eax, 2
pop ebx
ret
Function at 0x10048e20
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
push ebx
test eax, eax
je 0x10048f0d
mov ebx, dword [esp + 0xc]
test ebx, ebx
je 0x10048f0d
push esi
push edi
push 0x10058ae0
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fopen
mov edi, eax
add esp, 8
test edi, edi
jne 0x10048e75
call dword [sym.imp.KERNEL32.dll_GetLastError]
sub eax, 2
je 0x10048e6a
sub eax, 1
je 0x10048e6a
mov esi, 0xe
pop edi
mov eax, esi
pop esi
pop ebx
ret
mov esi, 4
pop edi
mov eax, esi
pop esi
pop ebx
ret
push 2
push 0
push edi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fseek
add esp, 0xc
test eax, eax
je 0x10048e9a
push edi
mov esi, 0xe
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
ret
push edi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_ftell
mov esi, eax
add esp, 4
test esi, esi
js 0x10048e86
push 0
push 0
push edi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fseek
add esp, 0xc
test eax, eax
jne 0x10048e86
test esi, esi
je 0x10048ee8
push esi
push ebx
call fcn.100489c0
add esp, 8
test eax, eax
jne 0x10048ef9
mov eax, dword [ebx + 8]
add eax, dword [ebx + 4]
je 0x10048ef9
push edi
push esi
push 1
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
add esp, 0x10
cmp eax, esi
jne 0x10048e86
add dword [ebx + 4], esi
push edi
xor esi, esi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
ret
mov esi, 0xf
push edi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
ret
mov eax, 2
pop ebx
ret
Function at 0x1004b190
Capabilities:
Check if file exists

Disassembly:
sub esp, 0x5c
mov eax, dword [0x10087040]
xor eax, esp
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x60]
push ebp
mov ebp, dword [esp + 0x6c]
push esi
mov esi, dword [esp + 0x6c]
cmp eax, 2
jne 0x1004b1c4
push 4
push ebp
push esi
call fcn.1004ae20
add esp, 0xc
mov esi, eax
jmp 0x1004b2c1
cmp eax, 0x17
jne 0x1004b2fe
push esi
call fcn.10044700
add esp, 4
cmp eax, 0x46
jb 0x1004b1ee
push 0x2738
call dword [sym.imp.KERNEL32.dll_SetLastError]
or esi, 0xffffffff
jmp 0x1004b2c1
push edi
push 0x46
lea eax, [esp + 0x20]
push esi
push eax
call fcn.10044650
lea eax, [esp + 0x28]
push 0x2f
push eax
call sub.VCRUNTIME140.dll_strchr
mov edi, eax
add esp, 0x14
test edi, edi
je 0x1004b215
mov byte [edi], 0
inc edi
lea eax, [esp + 0xc]
push eax
lea eax, [esp + 0x20]
push eax
call fcn.1004b320
add esp, 8
cmp eax, 1
je 0x1004b234
or esi, 0xffffffff
jmp 0x1004b2c0
push ebx
test edi, edi
jne 0x1004b255
mov esi, 0x80
lea eax, [esi + 7]
shr eax, 3
push eax
lea eax, [esp + 0x14]
push eax
push ebp
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
jmp 0x1004b2bf
mov al, byte [edi]
xor esi, esi
xor ebx, ebx
test al, al
je 0x1004b2b4
nop
movsx eax, al
lea edi, [edi + 1]
push eax
push str.0123456789
call sub.VCRUNTIME140.dll_strchr
add esp, 8
test eax, eax
je 0x1004b2b4
mov ecx, ebx
inc ebx
test ecx, ecx
je 0x1004b283
test esi, esi
je 0x1004b2b4
lea esi, [esi + esi*4]
add esi, esi
sub esi, str.0123456789
add esi, eax
cmp esi, 0x80
ja 0x1004b2b4
mov al, byte [edi]
test al, al
jne 0x1004b260
test ebx, ebx
je 0x1004b2b4
lea eax, [esi + 7]
shr eax, 3
cmp eax, 0x10
jbe 0x1004b244
push 0x2738
jmp 0x1004b2b6
push 2
call dword [sym.imp.KERNEL32.dll_SetLastError]
or esi, 0xffffffff
pop ebx
pop edi
cmp esi, 0xffffffff
jne 0x1004b2e4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x1004b2e4
pop esi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x58]
xor ecx, esp
call fcn.10052757
add esp, 0x5c
ret
sar esi, 0x1f
and esi, 0xfffffffe
lea eax, [esi + 1]
pop esi
pop ebp
mov ecx, dword [esp + 0x58]
xor ecx, esp
call fcn.10052757
add esp, 0x5c
ret
push 0x273f
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [esp + 0x60]
or eax, 0xffffffff
pop esi
pop ebp
xor ecx, esp
call fcn.10052757
add esp, 0x5c
ret
Function at 0x1004b8e0
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x14c
mov eax, dword [0x10087040]
xor eax, esp
mov dword [esp + 0x148], eax
mov eax, dword [esp + 0x150]
mov ecx, dword [esp + 0x158]
push ebx
mov ebx, dword [esp + 0x158]
push ebp
xor ebp, ebp
mov dword [esp + 0xc], ecx
mov dword [esp + 8], ebp
test eax, eax
je 0x1004baf9
test ebx, ebx
je 0x1004baf9
test ecx, ecx
je 0x1004baf9
mov dword [ecx], ebp
test byte [eax], 0x40
jne 0x1004badd
push 0x2e
push ebx
call sub.VCRUNTIME140.dll_strchr
add esp, 8
test eax, eax
jne 0x1004badd
push esi
push str.HOSTALIASES
call sub.api_ms_win_crt_environment_l1_1_0.dll_getenv
mov esi, eax
add esp, 4
test esi, esi
jne 0x1004b967
lea esi, [ebp + 4]
jmp 0x1004ba90
call fcn.10048940
mov ebp, eax
test ebp, ebp
jne 0x1004b97a
lea esi, [eax + 0xf]
jmp 0x1004ba90
push ebp
push esi
call fcn.10048e20
mov esi, eax
add esp, 8
test esi, esi
jne 0x1004ba90
lea eax, [esp + 0xc]
push eax
push esi
push 0x30
push 1
push 0x1007a118
push ebp
call fcn.10049200
mov esi, eax
add esp, 0x18
test esi, esi
jne 0x1004ba90
push edi
push dword [esp + 0x10]
call fcn.10043cd0
mov edi, eax
add esp, 4
test edi, edi
je 0x1004ba8a
push edi
call fcn.10043cd0
push 0x3f
mov esi, eax
mov byte [esp + 0x20], 0
lea eax, [esp + 0x21]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push 0xff
lea eax, [esp + 0x6d]
mov byte [esp + 0x6c], 0
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push esi
call fcn.10049570
push esi
call fcn.10048770
push 0x40
lea eax, [esp + 0x40]
push eax
push esi
call fcn.100495d0
add esp, 0x30
test eax, eax
jne 0x1004ba77
lea eax, [esp + 0x18]
push ebx
push eax
call fcn.1004f1a0
add esp, 8
test eax, eax
jne 0x1004ba77
push 1
push esi
call fcn.100488a0
push esi
call fcn.10049570
push esi
call fcn.10048770
push 0x100
lea eax, [esp + 0x6c]
push eax
push esi
call fcn.100495d0
add esp, 0x1c
test eax, eax
jne 0x1004ba77
lea eax, [esp + 0x58]
push eax
call fcn.10044700
add esp, 4
test eax, eax
je 0x1004ba77
lea eax, [esp + 0x58]
push eax
call fcn.10044510
add esp, 4
test eax, eax
jne 0x1004babc
push edi
call fcn.10043d90
mov edi, eax
add esp, 4
test edi, edi
jne 0x1004b9c7
mov esi, 4
pop edi
push ebp
call fcn.100489a0
push dword [esp + 0x10]
call fcn.10043980
add esp, 8
mov eax, esi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x148]
xor ecx, esp
call fcn.10052757
add esp, 0x14c
ret
lea eax, [esp + 0x58]
push eax
call fcn.100446b0
mov ecx, dword [esp + 0x18]
xor esi, esi
add esp, 4
test eax, eax
mov dword [ecx], eax
mov ecx, 0xf
cmove esi, ecx
jmp 0x1004ba8f
pop ebp
mov eax, 4
pop ebx
mov ecx, dword [esp + 0x148]
xor ecx, esp
call fcn.10052757
add esp, 0x14c
ret
mov ecx, dword [esp + 0x150]
mov eax, 2
pop ebp
pop ebx
xor ecx, esp
call fcn.10052757
add esp, 0x14c
ret