joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40ac20
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
push esi
mov esi, dword [ebp + 0xc]
test eax, eax
jg 0x40ac44
jl 0x40ac38
test esi, esi
jne 0x40ac44
pop esi
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x40ac5d
push eax
push esi
push dword [ebp + 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char___long_long___int64__]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x1c]
push edi
mov edi, esi
mov ecx, dword [eax]
test ecx, ecx
je 0x40ac9b
mov eax, dword [ebx + 0x2c]
mov eax, dword [eax]
test eax, eax
je 0x40ac9b
mov edi, dword [ebp + 0xc]
cmp eax, edi
cmovb esi, eax
push esi
push ecx
push dword [ebp + 8]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x2c]
sub edi, esi
add dword [ebp + 8], esi
add esp, 0xc
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov esi, dword [ebp + 0xc]
jmp 0x40aca1
mov eax, dword [ebp + 8]
mov dword [ebp + 8], eax
cmp dword [ebx + 0x4c], 0
mov edx, edi
je 0x40ad20
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x40acca
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 0x54]
mov ecx, dword [ebx + 0x50]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [ebx + 0x2c]
mov dword [eax], edx
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov edx, edi
mov ecx, dword [ebp + 8]
cmp edi, 0xfff
jbe 0x40ad0c
nop dword [eax]
push dword [ebx + 0x4c]
push 0xfff
push 1
push ecx
call eax
mov ecx, dword [ebp + 8]
sub edi, eax
add ecx, eax
add esp, 0x10
mov dword [ebp + 8], ecx
mov edx, edi
cmp eax, 0xfff
jne 0x40ad33
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x40ace0
test edx, edx
je 0x40ad20
push dword [ebx + 0x4c]
push edi
push 1
push ecx
call eax
mov edx, edi
add esp, 0x10
sub edx, eax
sub esi, edx
mov edx, dword [ebp + 0x10]
pop edi
mov eax, esi
sbb edx, 0
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [ebp + 0x10]
sub esi, edi
pop edi
mov eax, esi
sbb edx, 0
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x40b060
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x51300c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x40b090
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f1f57
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
mov eax, dword [eax]
test eax, eax
je 0x40b0c0
mov edx, dword [esi + 0x30]
mov edx, dword [edx]
add edx, eax
cmp eax, edx
jae 0x40b0c0
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Pninc_void_]
pop esi
mov byte [eax], bl
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f1f57
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
push edi
je 0x40b196
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x40b0e9
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 0x40b0f5
movsx eax, bl
jmp 0x40b12d
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x25], bl
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x25]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet___char_const___char_const___char_const____char___char___char___const]
sub eax, 0
je 0x40b157
sub eax, 1
je 0x40b157
sub eax, 2
jne 0x40b196
movsx eax, byte [ebp - 0x25]
push dword [esi + 0x4c]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
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.004f1f57
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x40b175
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 0x40b196
lea eax, [ebp - 0x25]
mov byte [esi + 0x3d], 1
cmp dword [ebp - 0x30], eax
je 0x40b196
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f1f57
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004f1f57
mov esp, ebp
pop ebp
ret 4
Function at 0x40b490
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x51300c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x40b54c
cmp byte [esi + 0x3d], 0
je 0x40b54c
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x40b53a
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_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, 0
je 0x40b501
sub eax, 1
je 0x40b505
sub eax, 2
jne 0x40b53a
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f1f57
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x40b523
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 0x40b53a
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f1f57
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f1f57
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.004f1f57
mov esp, ebp
pop ebp
ret
Function at 0x40ef40
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f4d5d
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x51300c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
push 0x3c
mov dword [ebp - 4], 0
call fcn.004f1f65
mov ecx, dword [ebp + 8]
mov edi, eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x10], edi
add esp, 4
mov dword [edi], vtable.VarDefineFileReader.0
mov dword [edi + 4], eax
mov dword [edi + 8], 0
mov dword [edi + 0xc], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
mov dword [edi + 0x24], 0
mov dword [edi + 0x28], 0xf
mov byte [edi + 0x14], 0
mov dword [edi + 0x2c], 0
mov dword [edi + 0x30], 0
mov dword [edi + 0x34], 0
mov dword [edi + 0x38], 0
cmp dword [ecx + 0x14], 0x10
jb 0x40eff6
mov ecx, dword [ecx]
mov eax, dword [edi]
push ecx
mov ecx, edi
mov eax, dword [eax]
call eax
test al, al
jne 0x40f00f
push ecx
mov ecx, edi
call fcn.0040f080
xor bl, bl
jmp 0x40f05e
mov eax, dword [ebp - 0x18]
mov esi, dword [ebp - 0x1c]
cmp esi, eax
je 0x40f054
mov edi, eax
nop dword [eax + eax]
mov ecx, esi
call fcn.004c1890
mov eax, dword [ebx + 0xc]
mov ecx, ebx
push esi
mov eax, dword [eax + 4]
mov dword [esi + 0x14], eax
mov eax, dword [ebx]
mov eax, dword [eax + 8]
call eax
test al, al
je 0x40f047
mov ecx, dword [ebx + 0xc]
mov eax, dword [esi + 4]
add dword [ecx + 4], eax
add esi, 0xa0
cmp esi, edi
jne 0x40f020
mov edi, dword [ebp - 0x10]
push ecx
mov ecx, edi
call fcn.0040f080
mov bl, 1
lea ecx, [ebp - 0x1c]
call fcn.0040e490
mov al, bl
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 0x447920
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 4], edx
push 0
push 0x14
mov dword [ebx], 0
call fcn.00413230
mov esi, eax
add esp, 8
test esi, esi
jne 0x447950
lea eax, [esi + 7]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [0x513104], 0
mov edi, dword [ebp + 8]
je 0x44799b
mov eax, dword [0x513200]
test eax, eax
je 0x447973
push 0xc8
call eax
add esp, 4
test eax, eax
jne 0x44799b
mov eax, dword [ebp - 4]
mov dword [esi + 8], eax
lea eax, [esi + 4]
push eax
push 0
push esi
push 0x417000
push 0
push 0
mov dword [esi + 0xc], edi
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
add esp, 0x18
mov dword [esi], eax
test eax, eax
jne 0x4479a8
xorps xmm0, xmm0
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
cmp dword [esi + 8], 0
jne 0x4479c1
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push edi
mov dword [esi + 4], eax
call dword [ebp - 4]
add esp, 4
mov dword [esi + 0x10], eax
pop edi
mov dword [ebx], esi
xor eax, eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x471100
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
push ebx
mov ebx, ecx
mov dword [esp + 8], edx
push esi
push edi
mov ecx, dword [ebx]
mov dword [esp + 0xc], ecx
mov eax, dword [ecx + 0x20]
and eax, 0x4000
or eax, 0
je 0x4712ce
mov eax, dword [ebp + 8]
cmp byte [eax + 0x2b], 0
jne 0x4712ce
mov esi, dword [ebx + 8]
xor edi, edi
test esi, esi
jne 0x47115a
cmp dword [ebx + 0x78], edi
jne 0x47114e
test byte [ecx + 0x50], 8
jne 0x47114e
mov byte [ebx + 0x17], 1
mov ecx, ebx
call fcn.00436f50
mov esi, eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x3c]
mov edx, dword [eax]
add ecx, 0x38
push 0
call fcn.00418ee0
add esp, 4
cmp dword [eax + 8], edi
jne 0x4711fb
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 0x30]
test ecx, ecx
je 0x4712ce
mov edx, dword [esp + 0xc]
cmp byte [ecx + 0x18], 0
jne 0x4711a8
mov eax, dword [edx + 0x20]
and eax, 0x80000
or eax, 0
jne 0x4711a8
mov ecx, dword [ecx + 4]
test ecx, ecx
jne 0x471187
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
dec dword [ebx + 0x38]
mov ecx, dword [esi + 0x6c]
mov edi, dword [ebx + 0x38]
cmp dword [esi + 0x70], ecx
jg 0x4711cc
push 0
push edi
push 1
mov edx, 0x31
mov ecx, esi
call fcn.00437140
add esp, 0xc
jmp 0x4711fb
lea eax, [ecx + 1]
mov dword [esi + 0x6c], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esi + 0x68]
mov dword [eax + ecx*4], 0x31
mov dword [eax + ecx*4 + 4], 1
mov dword [eax + ecx*4 + 8], edi
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov edx, dword [esp + 0x10]
push 0
push 0
push 0
push ecx
mov ecx, dword [esp + 0x1c]
push 0
mov byte [ebx + 0x9f], 1
call fcn.0044f5a0
add esp, 8
mov edx, eax
mov ecx, ebx
call fcn.0046a130
mov eax, dword [esp + 0x18]
add esp, 0xc
mov byte [ebx + 0x9f], 0
mov eax, dword [eax + 0x20]
and eax, 0x80000
or eax, 0
jne 0x4712a2
mov ecx, dword [esi + 0x6c]
lea edx, [ecx + 2]
cmp dword [esi + 0x70], ecx
jg 0x47125c
push eax
push edx
push eax
lea edx, [eax + 0x31]
mov ecx, esi
call fcn.00437140
add esp, 0xc
jmp 0x47128b
lea eax, [ecx + 1]
mov dword [esi + 0x6c], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esi + 0x68]
mov dword [eax + ecx*4], 0x31
mov dword [eax + ecx*4 + 4], 0
mov dword [eax + ecx*4 + 8], edx
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
push 4
push 0xffffffffffffffff
push 0
push 2
mov edx, 0x313
mov ecx, ebx
call fcn.00468720
add esp, 0x10
test edi, edi
je 0x4712ce
mov ecx, dword [esi + 0xc]
not edi
mov eax, dword [ecx + 0x3c]
add eax, dword [ecx + 0x38]
jns 0x4712c5
push edi
mov edx, esi
call fcn.004376f0
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ecx + 0x40]
mov eax, dword [esi + 0x6c]
mov dword [ecx + edi*4], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4c4660
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f52cd
mov eax, dword fs:[0]
push eax
mov eax, dword [0x51300c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
lea eax, [ebp + 8]
cmp dword [ebp + 0x1c], 0x10
cmovae eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov edx, dword [ebp + 0x1c]
cmp edx, 0x10
jb 0x4c46d1
mov ecx, dword [ebp + 8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4c46c7
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4c46c7
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.004f1f95
add esp, 8
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret
Function at 0x4c46f0
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f52fd
mov eax, dword fs:[0]
push eax
sub esp, 0x164
mov eax, dword [0x51300c]
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 esi, edx
cmp dword [ecx + 0x14], 0x10
jb 0x4c4728
mov ecx, dword [ecx]
lea eax, [ebp - 0x168]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, eax
mov dword [ebp - 0x16c], ebx
cmp ebx, 0xffffffff
jne 0x4c474a
xor al, al
jmp 0x4c4882
mov edi, dword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbscmp]
lea eax, [ebp - 0x13c]
push 0x5001e4
push eax
call edi
add esp, 8
test eax, eax
je 0x4c4750
lea eax, [ebp - 0x13c]
push 0x506950
push eax
call edi
add esp, 8
test eax, eax
je 0x4c4750
sub esp, 0x18
lea eax, [ebp - 0x13c]
mov edx, esp
lea ebx, [eax + 1]
mov dword [edx], 0
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 0xf
nop dword [eax]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4c47a0
sub eax, ebx
mov ecx, edx
push eax
lea eax, [ebp - 0x13c]
push eax
call fcn.00402d80
lea ecx, [ebp - 0x28]
call fcn.004c4220
add esp, 0x18
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x28]
mov eax, dword [esi + 4]
push ecx
cmp eax, dword [esi + 8]
je 0x4c47e3
mov ecx, eax
call fcn.00402cf0
add dword [esi + 4], 0x18
jmp 0x4c47eb
push eax
mov ecx, esi
call fcn.004c4ee0
mov ebx, dword [ebp - 0x16c]
lea eax, [ebp - 0x168]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x4c4843
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x4c4750
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4c4834
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4c4869
push edx
push ecx
call fcn.004f1f95
add esp, 8
jmp 0x4c4750
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x4c4879
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4c486f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4c486f
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.004f1f95
add esp, 8
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov al, 1
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.004f1f57
mov esp, ebp
pop ebp
ret
Function at 0x4c70f0
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f54cb
mov eax, dword fs:[0]
push eax
push ecx
push esi
mov eax, dword [0x51300c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x10], esi
mov dword [esi + 0x20], 0
mov dword [esi + 0x30], 0
mov dword [esi + 0x34], 0xf
mov byte [esi + 0x20], 0
mov dword [ebp - 4], 0
mov dword [esi + 0x38], 0
mov dword [esi + 0x48], 0
mov dword [esi + 0x4c], 0xf
mov byte [esi + 0x38], 0
lea ecx, [esi + 0x54]
mov byte [ebp - 4], 1
call fcn.004c6ac0
mov dword [esi + 0xd4], 0
mov eax, esi
mov dword [esi + 0xe4], 0
mov dword [esi + 0xe8], 0xf
mov byte [esi + 0xd4], 0
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0x4000
mov dword [esi + 0x18], 0
mov dword [esi + 0x1c], 0
mov dword [esi + 0x50], 0
mov dword [esi + 0xc8], 0
mov dword [esi + 0xcc], 0
mov dword [esi + 0xd0], 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4c77f0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
push esi
mov ebx, ecx
push edi
mov edi, dword [ebp + 8]
push dword [ebx]
push 1
push dword [ebx + 8]
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov esi, dword [ebx + 8]
mov ecx, eax
add esp, 0x10
cmp ecx, 1
sete al
mov byte [esp + 0x13], al
mov eax, esi
cdq
idiv dword [ebx + 0x18]
mov dword [ebx + 0x1c], eax
cmp ecx, 1
jne 0x4c7985
add dword [ebx + 0x14], esi
cmp dword [ebx + 0x4c], 0x10
push 0xffffffffffffffff
push eax
lea eax, [ebx + 0x38]
push ecx
mov ecx, esp
jb 0x4c7847
mov eax, dword [eax]
mov dword [ecx], eax
mov edx, 0x18
push ecx
mov eax, esp
lea ecx, [ebx + 0x20]
mov dword [eax], str.read
call fcn.004c5860
mov eax, dword [ebx + 0x1c]
add esp, 0x10
mov edx, dword [ebx + 0x18]
xor ecx, ecx
mov dword [esp + 0x14], 0
mov esi, edi
mov dword [esp + 0x1c], edx
test eax, eax
je 0x4c7935
mov edi, edx
jmp 0x4c788c
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
dec eax
mov dword [esp + 0x18], eax
cmp edx, 1
jne 0x4c789c
xor edx, edx
cmp byte [esi], dl
jmp 0x4c78a1
xor edx, edx
cmp word [esi], dx
sete dl
mov eax, edi
test edx, edx
je 0x4c78d9
test ecx, ecx
je 0x4c78cb
cmp esi, ecx
je 0x4c78cb
imul edi, dword [esp + 0x14]
mov eax, esi
sub eax, ecx
push eax
push ecx
sub ecx, edi
push ecx
call sub.VCRUNTIME140.dll_memmove
mov eax, dword [ebx + 0x18]
add esp, 0xc
mov edx, dword [esp + 0x14]
lea ecx, [eax + esi]
inc edx
mov dword [esp + 0x14], edx
jmp 0x4c78dd
mov edx, dword [esp + 0x14]
add esi, eax
mov edi, eax
cmp dword [esp + 0x18], 0
jne 0x4c7884
test ecx, ecx
je 0x4c7902
cmp esi, ecx
je 0x4c7902
sub esi, ecx
imul eax, edx
push esi
push ecx
sub ecx, eax
push ecx
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
mov esi, dword [esp + 0x14]
test esi, esi
je 0x4c7932
push 0xffffffffffffffff
push esi
push ecx
mov eax, esp
mov edx, 1
push ecx
lea ecx, [ebx + 0x20]
mov dword [eax], 0
mov eax, esp
mov dword [eax], str.nulls_removed
call fcn.004c5860
add esp, 0x10
sub dword [ebx + 0x1c], esi
mov edi, dword [ebp + 8]
cmp dword [ebx + 0x18], 1
jle 0x4c7985
test byte [ebx + 4], 0x80
je 0x4c7985
mov ecx, dword [ebx + 0x1c]
test ecx, ecx
je 0x4c7962
nop dword [eax + eax]
movzx eax, word [edi + ecx*2 - 2]
dec ecx
rol ax, 8
mov word [edi + ecx*2], ax
test ecx, ecx
jne 0x4c7950
push 0xffffffffffffffff
push 0xffffffffffffffff
push ecx
mov eax, esp
xor edx, edx
push ecx
lea ecx, [ebx + 0x20]
mov dword [eax], 0
mov eax, esp
mov dword [eax], str.endian_swap
call fcn.004c5860
add esp, 0x10
mov al, byte [esp + 0x13]
test al, al
jne 0x4c7998
mov ecx, ebx
call fcn.004c7200
mov al, byte [esp + 0x13]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x4c8530
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push ecx
push ebx
push esi
mov esi, ecx
push edi
mov edi, dword [ebp + 8]
mov ebx, edi
mov eax, dword [esi + 0x18]
mov edx, dword [esi + 0x1c]
imul eax, edx
mov dword [esi + 8], eax
mov eax, dword [ebp + 0xc]
test eax, eax
cmovne ebx, eax
xor eax, eax
test byte [esi + 4], 0x80
mov dword [esp + 0xc], eax
je 0x4c85d5
test edi, edi
jne 0x4c859b
xor ecx, ecx
mov eax, edx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004f2745
mov ecx, dword [esi + 0x1c]
add esp, 4
add ecx, ecx
mov edi, eax
mov dword [esp + 0xc], edi
push ecx
push ebx
push edi
call sub.VCRUNTIME140.dll_memcpy
mov edx, dword [esi + 0x1c]
add esp, 0xc
mov ebx, edi
test edx, edx
je 0x4c85b2
nop
movzx eax, word [edi + edx*2 - 2]
dec edx
rol ax, 8
mov word [edi + edx*2], ax
test edx, edx
jne 0x4c85a0
push 0xffffffffffffffff
push 0xffffffffffffffff
push ecx
mov eax, esp
xor edx, edx
push ecx
lea ecx, [esi + 0x20]
mov dword [eax], 0
mov eax, esp
mov dword [eax], str.endian_swap
call fcn.004c5860
add esp, 0x10
push dword [esi]
push 1
push dword [esi + 8]
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp eax, 1
mov eax, dword [esp + 0xc]
sete bl
test eax, eax
je 0x4c85fd
push eax
call fcn.004f2732
add esp, 4
test bl, bl
je 0x4c8640
mov eax, dword [esi + 8]
add dword [esi + 0x14], eax
cmp dword [esi + 0x4c], 0x10
push 0xffffffffffffffff
push dword [esi + 0x1c]
push ecx
lea ecx, [esi + 0x38]
mov eax, esp
jb 0x4c861a
mov ecx, dword [ecx]
mov dword [eax], ecx
mov edx, 0x18
push ecx
mov ecx, esp
mov dword [ecx], str.write
lea ecx, [esi + 0x20]
call fcn.004c5860
add esp, 0x10
mov al, bl
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, esi
call fcn.004c7200
pop edi
pop esi
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x4d1420
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x19c
mov eax, dword [0x51300c]
xor eax, esp
mov dword [esp + 0x198], eax
push esi
push 0x40
mov esi, ecx
push 0
push esi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [esi + 0x34], 0xffffffff
lea eax, [esp + 8]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov ecx, dword [esp + 0x19c]
mov dword [esi + 0x14], 0xbb8
mov dword [esi + 4], str.udp:__8.8.8.8:53
mov dword [esi + 0xc], str.udp:___2001:4860:4860::8888_:53
pop esi
xor ecx, esp
call fcn.004f1f57
mov esp, ebp
pop ebp
ret
Function at 0x4d2930
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x51300c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov bl, byte [ebp + 0xc]
push esi
mov esi, ecx
mov ecx, dword [ebp + 8]
push edi
mov edi, edx
cmp ecx, 0xfffffffe
je 0x4d2a61
mov eax, dword [esi + 0x9c]
test ecx, ecx
jg 0x4d297c
or eax, 0x2000
mov dword [esi + 0x9c], eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f1f57
mov esp, ebp
pop ebp
ret
test eax, 0x800
je 0x4d29f8
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0x10
push eax
lea eax, [ebp - 0x14]
push eax
push dword [esi + 0x40]
call dword [sym.imp.WS2_32.dll_getsockname]
push str.iolog
push 0x116b
mov ecx, 2
call fcn.004d0c50
add esp, 8
test al, al
je 0x4d29eb
push dword [ebp + 8]
lea eax, [esi + 0x24]
mov ecx, 0x5067a4
push eax
push 0x4d1700
test bl, bl
mov eax, 0x5094f8
cmove eax, ecx
push eax
lea eax, [esi + 8]
push eax
push 0x4d1700
push dword [esi + 0x44]
push str._n____lu__M__s__M__ld
call fcn.004d0d30
add esp, 0x20
mov edx, dword [ebp + 8]
mov ecx, edi
call fcn.004d0d70
mov ecx, dword [ebp + 8]
test bl, bl
je 0x4d2a27
add dword [esi + 0x50], ecx
mov eax, dword [esi + 0x68]
test eax, eax
je 0x4d2a15
push dword [esi + 0x6c]
lea ecx, [ebp + 8]
push ecx
push 7
push esi
call eax
add esp, 0x10
mov eax, dword [esi + 0x70]
test eax, eax
je 0x4d2a61
push dword [esi + 0x74]
lea ecx, [ebp + 8]
push ecx
push 7
jmp 0x4d2a5b
push ecx
lea ecx, [esi + 0x58]
xor edx, edx
call fcn.004d0bd0
mov eax, dword [esi + 0x68]
add esp, 4
test eax, eax
je 0x4d2a4b
push dword [esi + 0x6c]
lea ecx, [ebp + 8]
push ecx
push 8
push esi
call eax
add esp, 0x10
mov eax, dword [esi + 0x70]
test eax, eax
je 0x4d2a61
push dword [esi + 0x74]
lea ecx, [ebp + 8]
push ecx
push 8
push esi
call eax
add esp, 0x10
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004f1f57
mov esp, ebp
pop ebp
ret