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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x429f30]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x414d71
cmp byte [ebx], 0xa
jne 0x414d71
or byte [edi + eax + 0x28], 4
jmp 0x414d76
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x414e75
mov dl, byte [eax]
cmp dl, 0x1a
je 0x414e58
inc eax
cmp dl, 0xd
je 0x414da2
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x414dc8
cmp eax, ecx
jae 0x414dd6
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x414d8a
jmp 0x414e75
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x414e53
cmp dword [ebp - 0x10], 0
je 0x414e53
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x429f30]
test byte [eax + edi + 0x28], 0x48
je 0x414e2d
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x414e18
mov byte [esi], dl
jmp 0x414e29
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x429f30]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x414e75
cmp byte [ebp - 1], 0xa
jne 0x414e3c
cmp esi, ebx
jne 0x414e3c
mov byte [esi], 0xa
jmp 0x414e74
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.004137be
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x414e75
mov byte [esi], 0xd
jmp 0x414e74
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x429f30]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x414e72
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x414e75
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x414e7e
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x429f30]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x414ec4
cmp word [ebx], dx
jne 0x414ec4
or byte [eax + edi + 0x28], 4
jmp 0x414ec9
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x41502c
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x41500c
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x414f0a
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x414f40
cmp eax, edx
jae 0x414f4e
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x414ee5
jmp 0x41502c
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x415007
cmp dword [ebp - 0x18], 0
je 0x415007
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x429f30]
test byte [eax + edi + 0x28], 0x48
je 0x414fdd
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x414fa1
mov word [esi], cx
jmp 0x414fd8
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x429f30]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x429f30]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x429f30]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x41502c
pop eax
cmp word [ebp - 4], ax
jne 0x414fed
cmp esi, ebx
jne 0x414fed
mov word [esi], ax
jmp 0x415029
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.004137be
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x41502c
push 0xd
pop eax
jmp 0x414fe8
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x429f30]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x415026
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x41502c
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x416ceb
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x416d88
push ebx
push esi
call fcn.00416cb4
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.00416c48
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x416d35
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x416d87
push edi
push eax
call fcn.004104e5
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x416d55
call fcn.004104ab
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x416d86
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.00416c48
add esp, 0x20
test eax, eax
jne 0x416d74
push edi
call fcn.004104ab
jmp 0x416d7c
push ebx
call fcn.004104ab
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret
Function at 0x41c9b5
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.0041c931
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x41cb24
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x41cb24
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x41cad9
jg 0x41ca11
test eax, eax
je 0x41cacf
push 1
push 0x1000
call fcn.00412649
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x41ca34
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x41cac6
push 0x8000
push ebx
call fcn.0040f8fc
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x41ca5d
jg 0x41ca58
cmp ecx, 0x1000
jb 0x41ca5d
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.00414679
add esp, 0x10
cmp eax, 0xffffffff
je 0x41caa2
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x41ca58
jl 0x41ca89
test ecx, ecx
jne 0x41ca4a
push dword [ebp - 0xc]
push ebx
call fcn.0040f8fc
push esi
call fcn.004104ab
add esp, 0xc
xor ebx, ebx
jmp 0x41cb32
cmp byte [edi + 0x24], 0
je 0x41cab9
cmp dword [edi + 0x20], 5
jne 0x41cab9
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x41cac4
mov ebx, dword [edi + 0x18]
jmp 0x41cac6
xor ebx, ebx
push esi
call fcn.004104ab
pop ecx
jmp 0x41cb32
test ecx, ecx
jg 0x41ca9b
jl 0x41cad9
test eax, eax
jae 0x41ca9b
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.004137be
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x41caf9
cmp byte [edi + 0x1c], 0
je 0x41ca9b
jmp 0x41cb2a
push ebx
call fcn.00417155
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x41ca9b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x41cb32
cmp byte [edi + 0x1c], 0
je 0x41cb2f
mov ebx, dword [edi + 0x18]
jmp 0x41cb32
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.004137be
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x41deb0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x41dedd
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x41dedd
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x4025f0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
push esi
mov ebx, ecx
mov ecx, 0x462109
push edi
mov dword [esp + 0xc], ebx
call fcn.00442cfb
cmp dword [ebx + 0x38], 0
je 0x40262c
push dword [ebp + 0x10]
mov ecx, ebx
push dword [ebp + 0xc]
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__::xsputn_char_const___long_long___int64__]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x20]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x20], esi
mov ecx, dword [eax]
lea eax, [ebx + 0x30]
mov dword [esp + 0x24], edi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
test ecx, ecx
je 0x402654
mov eax, dword [eax]
mov ecx, dword [eax]
jmp 0x40265a
xor ecx, ecx
mov dword [esp + 0x18], eax
mov eax, ecx
cdq
mov dword [esp + 0x10], eax
mov ecx, edx
mov dword [esp + 0x14], ecx
test edi, edi
jl 0x4026c8
jg 0x402671
test esi, esi
je 0x4026c8
test ecx, ecx
jl 0x4026bf
jg 0x40267b
test eax, eax
je 0x4026bf
cmp edi, ecx
jg 0x40268f
jl 0x402685
cmp esi, eax
jae 0x40268f
mov eax, esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], edi
mov ebx, dword [ebp + 8]
push eax
push ebx
push dword [esp + 0x24]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x24]
add esp, 0xc
mov edx, dword [esp + 0x10]
add ebx, edx
mov ecx, dword [esp + 0xc]
sub esi, edx
mov eax, dword [eax]
sbb edi, dword [esp + 0x14]
sub dword [eax], edx
mov eax, dword [ecx + 0x20]
add dword [eax], edx
jmp 0x4026cf
mov ebx, dword [ebp + 8]
mov ecx, dword [esp + 0xc]
jmp 0x4026d9
mov ebx, dword [ebp + 8]
mov ecx, dword [esp + 0xc]
test edi, edi
jl 0x4026f3
jg 0x4026d9
test esi, esi
je 0x4026f3
mov eax, dword [ecx + 0x4c]
test eax, eax
je 0x4026f3
push eax
push esi
push 1
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x402710
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc
push ebx
push esi
mov ebx, ecx
mov ecx, 0x462109
push edi
call fcn.00442cfb
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
test eax, eax
jg 0x402745
jl 0x402738
test ecx, ecx
jne 0x402745
xor eax, eax
xor edx, edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x402761
push eax
push ecx
push dword [ebp + 8]
mov ecx, ebx
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 edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x1c]
mov edi, ecx
mov eax, dword [eax]
mov dword [esp + 0x14], eax
test eax, eax
je 0x4027b3
mov eax, dword [ebx + 0x2c]
lea edx, [ebx + 0x2c]
mov dword [esp + 0x10], edx
mov eax, dword [eax]
test eax, eax
je 0x4027ba
mov edi, dword [ebp + 8]
cmp eax, ecx
mov esi, ecx
cmovb esi, eax
push esi
push dword [esp + 0x18]
push edi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x2c]
add edi, esi
mov dword [esp + 0x20], edi
add esp, 0xc
mov edi, dword [ebp + 0xc]
sub edi, esi
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov esi, dword [esp + 0x14]
jmp 0x4027bd
lea eax, [ebx + 0x2c]
mov dword [esp + 0x10], eax
mov esi, dword [ebp + 8]
cmp dword [ebx + 0x4c], 0
je 0x40282a
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x4027e7
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 [esp + 0x10]
mov eax, dword [eax]
mov dword [eax], edx
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp edi, 0xfff
jbe 0x402818
push dword [ebx + 0x4c]
push 0xfff
push 1
push esi
call eax
add esp, 0x10
add esi, eax
sub edi, eax
cmp eax, 0xfff
jne 0x40282a
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x4027f4
test edi, edi
je 0x40282a
push dword [ebx + 0x4c]
push edi
push 1
push esi
call eax
add esp, 0x10
sub edi, eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
pop edi
pop esi
sbb edx, 0
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x402bd0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
mov esi, ecx
mov ecx, 0x462109
call fcn.00442cfb
mov ebx, dword [ebp + 8]
cmp ebx, 0xffffffff
jne 0x402bf6
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
mov eax, dword [eax]
test eax, eax
je 0x402c1e
mov ecx, dword [esi + 0x30]
mov ecx, dword [ecx]
add ecx, eax
cmp eax, ecx
jae 0x402c1e
mov ecx, esi
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 esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
push edi
je 0x402cfa
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x402c47
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 0x402c71
push dword [esi + 0x4c]
movsx eax, bl
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
cmove ebx, ecx
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret 4
lea eax, [ebp - 8]
mov byte [ebp - 1], bl
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp]
push eax
lea eax, [ebp - 1]
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 0x402cc3
sub eax, 1
je 0x402cc3
sub eax, 2
jne 0x402cfa
mov edx, dword [esi + 0x4c]
mov cl, byte [ebp - 1]
call fcn.00401970
or ecx, 0xffffffff
test al, al
pop edi
cmove ebx, ecx
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 8]
lea eax, [ebp - 0x2c]
sub edi, eax
je 0x402ce1
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 0x402cfa
lea ecx, [ebp - 1]
mov byte [esi + 0x3d], 1
or eax, 0xffffffff
cmp dword [ebp - 0xc], ecx
pop edi
pop esi
cmovne eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret 4
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x403b50
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push esi
mov esi, ecx
mov ecx, 0x462109
call fcn.00442cfb
cmp dword [esi + 0x38], 0
je 0x403be8
cmp byte [esi + 0x3d], 0
je 0x403be8
mov eax, dword [esi]
mov ecx, esi
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x403be0
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 4]
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 0x403bb1
sub eax, 1
je 0x403bb5
sub eax, 2
jne 0x403be0
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 4]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x403bd3
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 0x403be0
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov esp, ebp
pop ebp
ret
mov al, 1
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x404770
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, ecx
mov ecx, 0x462105
call fcn.00442cfb
push 0x24
call fcn.0043db65
add esp, 4
mov esi, eax
mov ecx, esi
push dword [ebp + 0x20]
call fcn.00403140
mov ecx, dword [ebp + 0x1c]
lea ebx, [edi + 4]
mov eax, dword [ebp + 0x14]
push ebx
push 0
mov ecx, dword [ecx]
mov dword [esi + 0xc], ecx
mov ecx, dword [ebp + 0x18]
push esi
push 0x405f30
push 0
mov ecx, dword [ecx]
mov dword [esi + 0x14], eax
mov dword [esi + 0x10], ecx
mov eax, dword [0x461584]
mov dword [esi + 0x18], eax
mov eax, dword [ebp + 0xc]
push 0
mov eax, dword [eax]
mov dword [esi + 0x1c], eax
mov dword [esi + 0x20], 0x440860
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
add esp, 0x18
mov dword [edi], eax
test eax, eax
je 0x4047ed
mov eax, edi
pop edi
pop esi
pop ebx
pop ebp
ret 0x1c
push 6
mov dword [ebx], 0
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
int3

Function at 0x404800
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
mov ecx, 0x462105
push edi
call fcn.00442cfb
push 0x10
call fcn.0043db65
mov edx, dword [ebp + 0x14]
lea edi, [esi + 4]
push edi
push 0
mov dword [eax], edx
mov ecx, dword [0x461584]
push eax
mov dword [eax + 4], ecx
mov ecx, dword [ebp + 0xc]
push 0x405fc0
push 0
push 0
mov ecx, dword [ecx]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], 0x440ab0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
add esp, 0x1c
mov dword [esi], eax
test eax, eax
je 0x40485c
pop edi
mov eax, esi
pop esi
pop ebp
ret 0x10
push 6
mov dword [edi], 0
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
int3
Function at 0x404870
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, ecx
mov ecx, 0x462105
call fcn.00442cfb
push 0x1c
call fcn.0043db65
mov edx, dword [ebp + 0x20]
lea ebx, [edi + 4]
mov ecx, dword [ebp + 0x1c]
mov esi, eax
mov eax, dword [ebp + 0x14]
push ebx
mov edx, dword [edx]
mov dword [esi], edx
mov ecx, dword [ecx]
mov dword [esi + 4], ecx
mov ecx, dword [ebp + 0x18]
push 0
push esi
push 0x406000
mov ecx, dword [ecx]
mov dword [esi + 8], ecx
mov al, byte [eax]
mov byte [esi + 0xc], al
mov eax, dword [0x461584]
mov dword [esi + 0x10], eax
mov eax, dword [ebp + 0xc]
push 0
push 0
mov eax, dword [eax]
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], 0x43ff00
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
add esp, 0x1c
mov dword [edi], eax
test eax, eax
je 0x4048e9
mov eax, edi
pop edi
pop esi
pop ebx
pop ebp
ret 0x1c
push 6
mov dword [ebx], 0
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
int3
Function at 0x40b66b
Capabilities:
Resolve dns
Set socket configuration

Disassembly:
push 0x44
mov eax, 0x4434b5
call fcn.0043e2c1
mov edi, dword [ebp + 8]
xor eax, eax
mov ebx, dword [ebp + 0xc]
push 0x20
push eax
mov dword [ebp - 4], eax
mov esi, eax
lea eax, [ebp - 0x50]
push eax
call sub.VCRUNTIME140.dll_memset
xor eax, eax
mov dword [ebp - 0x48], 1
add esp, 0xc
mov dword [ebp - 0x44], eax
cmp dword [ebx + 0x10], eax
je 0x40b6ba
cmp dword [ebx + 0x14], 0x10
mov esi, ebx
jb 0x40b6ae
mov esi, dword [ebx]
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x50], 4
jmp 0x40b6d5
cmp dword [edi + 0x10], eax
je 0x40b6c9
cmp dword [edi + 0x14], 0x10
mov esi, edi
jb 0x40b6c9
mov esi, dword [edi]
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x50], eax
push dword [ebp + 0x10]
lea eax, [ebp - 0x28]
push eax
call fcn.00409245
pop ecx
pop ecx
cmp dword [ebp - 0x14], 0x10
lea ecx, [ebp - 0x30]
push ecx
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 1
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push ecx
push eax
push esi
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
jne 0x40b7b8
mov esi, dword [ebp - 0x30]
test esi, esi
je 0x40b7b1
mov ebx, dword [sym.imp.WS2_32.dll_setsockopt]
push 0x81
push 0
push 0
push dword [esi + 0xc]
push dword [esi + 8]
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40b750
push dword [esi + 0xc]
push dword [esi + 8]
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
je 0x40b7a3
cmp byte [ebp + 0x1c], 0
je 0x40b768
push 4
xor ecx, ecx
lea eax, [ebp - 0x2c]
push eax
inc ecx
push ecx
push 6
push edi
mov dword [ebp - 0x2c], ecx
call ebx
cmp dword [ebp + 0x44], 0
je 0x40b777
push edi
lea ecx, [ebp + 0x20]
call fcn.00413c03
cmp dword [esi + 4], 0x17
jne 0x40b78e
and dword [ebp - 0x2c], 0
lea eax, [ebp - 0x2c]
push 4
push eax
push 0x1b
push 0x29
push edi
call ebx
push esi
push edi
lea ecx, [ebp + 0x48]
call fcn.0041354a
test al, al
jne 0x40b7d3
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x40b71b
mov esi, dword [ebp - 0x30]
push esi
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
or edi, 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.00403370
lea ecx, [ebp + 0x20]
call fcn.00418c2c
mov eax, edi
call fcn.0043e27f
ret
push dword [ebp - 0x30]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
jmp 0x40b7bb