joyce8/EMBER2024-capa huggingface dataset:
Function at 0x410d81
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push 0xcc
mov eax, 0x5971b1
call fcn.0055d546
mov edi, ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push 2
push 0x85
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test esi, esi
jne 0x410e67
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x14], esp
push 0x5e1685
call fcn.00403e67
and dword [ebp - 4], esi
lea ecx, [ebp - 0x90]
mov edx, ebx
call fcn.00404a8f
mov esi, eax
xor ebx, ebx
lea ecx, [ebp - 0x30]
inc ebx
mov edx, 0x85
mov byte [ebp - 4], bl
call fcn.00404ad6
push eax
mov edx, str.FindResource_err
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x60]
call fcn.00404bfe
mov byte [ebp - 4], 3
lea ecx, [ebp - 0xc0]
mov edx, eax
mov dword [esp], str._ierr
call fcn.00404c2e
sub esp, 0x14
mov byte [ebp - 4], 4
mov ecx, esp
mov edx, eax
push esi
call fcn.00404c60
pop ecx
mov byte [ebp - 4], 8
call fcn.0042f9b7
add esp, 0x30
lea ecx, [ebp - 0xc0]
xor esi, esi
push esi
push ebx
call fcn.00404102
push esi
push ebx
lea ecx, [ebp - 0x60]
call fcn.00404102
push esi
push ebx
lea ecx, [ebp - 0x30]
call fcn.00404102
lea ecx, [ebp - 0x90]
jmp 0x410f41
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push esi
push 0
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x410e94
test ebx, ebx
je 0x410e94
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [edi], eax
mov dword [edi + 4], ebx
jmp 0x410f4d
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x18], esp
push 0x5e1685
call fcn.00403e67
mov edx, ebx
mov dword [ebp - 4], 9
lea ecx, [ebp - 0xd8]
call fcn.0040ff62
mov esi, eax
mov edx, 0x85
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0xa8]
call fcn.00404ad6
push eax
mov edx, str.FindResource_err
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x78]
call fcn.00404bfe
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x48]
mov edx, eax
mov dword [esp], str._nResSize
call fcn.00404c2e
sub esp, 0x14
mov byte [ebp - 4], 0xd
mov ecx, esp
mov edx, eax
push esi
call fcn.00404c60
pop ecx
mov byte [ebp - 4], 0x11
call fcn.0042f9b7
add esp, 0x30
lea ecx, [ebp - 0x48]
xor esi, esi
xor ebx, ebx
inc ebx
push esi
push ebx
call fcn.00404102
push esi
push ebx
lea ecx, [ebp - 0x78]
call fcn.00404102
push esi
push ebx
lea ecx, [ebp - 0xa8]
call fcn.00404102
lea ecx, [ebp - 0xd8]
push esi
push ebx
call fcn.00404102
mov dword [edi + 4], esi
mov dword [edi], esi
mov eax, edi
call fcn.0055d4f5
ret
Function at 0x412cba
Capabilities:
Accept command line arguments

Disassembly:
push 0x7c
mov eax, 0x597769
call fcn.0055d546
mov ebx, ecx
mov dword [ebp - 0x80], ebx
xor esi, esi
mov dword [ebp - 4], esi
push 0x5e1685
mov dword [ebp - 0x88], ebx
mov dword [ebp - 0x7c], esi
call fcn.00403e67
xor edi, edi
mov dword [ebp - 4], esi
inc edi
mov dword [ebp - 0x7c], edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov edx, eax
lea ecx, [ebp - 0x74]
call fcn.00417c01
mov dword [ebp - 4], edi
xor eax, eax
lea edi, [ebp - 0x2c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x24], esi
push 0x5e48a8
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 2
call fcn.00403e67
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 3
push eax
lea edx, [ebp - 0x5c]
lea ecx, [ebp - 0x74]
call fcn.004178d7
xor eax, eax
lea edi, [ebp - 0x20]
stosd dword es:[edi], eax
pop ecx
xor ecx, ecx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
and dword [ebp - 0x18], ecx
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], ecx
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x28]
mov edi, dword [ebp - 0x2c]
sub eax, edi
cdq
mov dword [ebp - 0x78], 0x18
idiv dword [ebp - 0x78]
test eax, eax
je 0x412dc1
mov ebx, dword [ebp - 0x78]
mov esi, eax
push edi
lea ecx, [ebp - 0x44]
call fcn.00403e41
mov edx, 0x5e1685
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x44]
call fcn.004057c0
test al, al
jne 0x412da3
mov edx, 0x5e4910
lea ecx, [ebp - 0x44]
call fcn.004057c0
test al, al
jne 0x412da3
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x20]
call fcn.0040e173
push 0
push 1
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 4
call fcn.00404102
add edi, ebx
dec esi
jne 0x412d68
mov ecx, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x80]
sub ecx, esi
mov eax, ecx
cdq
idiv dword [ebp - 0x78]
cmp eax, 2
jb 0x412de1
lea eax, [esi + 0x18]
cmp ebx, eax
je 0x412de1
push 0xffffffffffffffff
push 0
push eax
mov ecx, ebx
call fcn.0040406e
lea ecx, [ebp - 0x20]
call fcn.00405788
push 0
push 1
lea ecx, [ebp - 0x5c]
call fcn.00404102
lea ecx, [ebp - 0x2c]
call fcn.00405788
push 0
push 1
lea ecx, [ebp - 0x74]
call fcn.00404102
mov eax, ebx
call fcn.0055d4f5
ret

Function at 0x41411f
Capabilities:
Receive data
Receive data on socket
Resolve function by parsing pe exports

Disassembly:
mov eax, dword [ecx + 0x130]
sub eax, dword [ecx + 0x134]
cmp eax, 0x28
jl method.AgentAppLink.virtual_0
ret
cmp byte [ecx + 0x61], 0
jne 0x42ddb4
cmp byte [ecx + 0x60], 0
je 0x42ddb4
mov byte [ecx + 0x60], 0
jmp fcn.0042ddb5
ret
Function at 0x417097
Capabilities:
Check os version
Get system information on windows

Disassembly:
push 0x14c
mov eax, 0x597d20
call fcn.0055d546
mov esi, ecx
xor ebx, ebx
mov dword [ebp - 4], ebx
push 0x5e1685
mov dword [ebp - 0x158], esi
mov dword [ebp - 0x154], ebx
call fcn.00403e67
lea eax, [ebp - 0x34]
mov dword [ebp - 4], ebx
push eax
mov dword [ebp - 0x154], 1
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov edi, str.unknown_OperatingSystem.
mov dword [ebp - 0x150], 0x11c
push edi
call fcn.004035bd
pop ecx
push eax
push edi
mov ecx, esi
call fcn.0040428c
lea eax, [ebp - 0x150]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x41722d
mov eax, dword [ebp - 0x14c]
sub eax, 4
je 0x4171dd
dec eax
je 0x417183
dec eax
jne 0x41722d
mov eax, dword [ebp - 0x148]
sub eax, ebx
je 0x417169
dec eax
je 0x41714f
dec eax
jne 0x41722d
cmp byte [ebp - 0x36], 1
jne 0x41722d
mov edi, str.Microsoft_Windows_10
jmp 0x41721d
cmp byte [ebp - 0x36], 1
jne 0x41715f
mov edi, str.Microsoft_Windows_7
jmp 0x41721d
mov edi, str.Microsoft_Windows_Server_2008_R2
jmp 0x41721d
cmp byte [ebp - 0x36], 1
jne 0x417179
mov edi, str.Microsoft_Windows_Vista
jmp 0x41721d
mov edi, str.Microsoft_Windows_Server_2008
jmp 0x41721d
mov eax, dword [ebp - 0x148]
sub eax, ebx
je 0x4171d6
dec eax
je 0x4171cf
dec eax
jne 0x41722d
cmp byte [ebp - 0x36], 1
jne 0x4171ab
cmp word [ebp - 0x34], 9
jne 0x4171ab
mov edi, str.Microsoft_Windows_XP_Professional_x64_Edition
jmp 0x41721d
mov edi, dword [sym.imp.USER32.dll_GetSystemMetrics]
push 0x59
call edi
test eax, eax
jne 0x4171c0
mov edi, str.Microsoft_Windows_Server_2003
jmp 0x41721d
push 0x59
call edi
test eax, eax
je 0x41722d
mov edi, str.Microsoft_Windows_Server_2003_R2
jmp 0x41721d
mov edi, str.Microsoft_Windows_XP
jmp 0x41721d
mov edi, str.Microsoft_Windows_2000
jmp 0x41721d
mov eax, dword [ebp - 0x148]
test eax, eax
je 0x4171ff
cmp eax, 0xa
je 0x4171f8
cmp eax, 0x5a
jne 0x41722d
mov edi, str.Microsoft_Windows_Me
jmp 0x41721d
mov edi, str.Microsoft_Windows_98
jmp 0x41721d
cmp dword [ebp - 0x140], 2
jne 0x41720f
mov edi, str.Microsoft_Windows_NT_4.0
jmp 0x41721d
cmp dword [ebp - 0x140], 1
jne 0x41722d
mov edi, str.Microsoft_Windows_95
push edi
call fcn.004035bd
pop ecx
push eax
push edi
mov ecx, esi
call fcn.0040428c
mov eax, esi
call fcn.0055d4f5
ret
Function at 0x417502
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push esi
xor esi, esi
mov dword [ebp - 0x18], edx
cmp byte [ecx], 0
je 0x417606
add ecx, 2
push ebx
mov dword [ebp - 0x14], ecx
push edi
or dword [ebp - 8], 0xffffffff
mov edi, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_
mov bh, byte [ecx - 2]
xor bl, bl
mov dl, byte [ebp - 8]
cmp byte [edi], bh
movzx eax, bl
movzx edx, dl
cmove edx, eax
inc bl
inc edi
cmp bl, 0x40
jb 0x417530
mov bh, byte [ecx - 1]
xor bl, bl
mov dword [ebp - 0x10], edx
mov edi, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_
mov dl, byte [ebp - 7]
cmp byte [edi], bh
movzx eax, bl
movzx edx, dl
cmove edx, eax
inc bl
inc edi
cmp bl, 0x40
jb 0x417553
mov bl, byte [ebp - 6]
mov edi, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_
mov dword [ebp - 0xc], edx
xor dl, dl
mov dh, byte [ecx]
cmp byte [edi], dh
movzx eax, dl
movzx ebx, bl
cmove ebx, eax
inc dl
inc edi
cmp dl, 0x40
jb 0x417575
mov al, byte [ecx + 1]
mov edi, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_
mov dl, byte [ebp - 5]
mov ch, al
mov byte [ebp - 1], 0
mov cl, byte [ebp - 1]
mov byte [ebp - 2], al
cmp byte [edi], ch
movzx eax, cl
movzx edx, dl
cmove edx, eax
inc cl
inc edi
cmp cl, 0x40
jb 0x41759f
mov al, byte [ebp - 0xc]
shl byte [ebp - 0x10], 2
mov edi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
shr al, 4
and al, 3
or al, byte [ebp - 0x10]
mov byte [esi + edi], al
inc esi
cmp byte [ecx], 0x3d
je 0x417604
shl byte [ebp - 0xc], 4
mov al, bl
shr al, 2
and al, 0xf
or al, byte [ebp - 0xc]
mov byte [esi + edi], al
inc esi
cmp byte [ecx + 1], 0x3d
je 0x417604
and dl, 0x3f
shl bl, 6
or dl, bl
add ecx, 4
mov byte [esi + edi], dl
inc esi
mov dword [ebp - 0x14], ecx
cmp byte [ecx - 2], 0
jne 0x41751f
pop edi
pop ebx
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x41e0a1
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x60f490]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
xor ebx, ebx
mov dword [ebp - 0x20], ecx
mov esi, edx
mov dword [ebp - 0x24], eax
push edi
mov edi, ebx
cmp dword [ecx + 0x10], ebx
je 0x41e1d0
cmp dword [esi + 0x10], ebx
je 0x41e1d0
cmp dword [esi + 0x14], 0x10
jb 0x41e0df
mov eax, dword [esi]
jmp 0x41e0e1
mov eax, esi
lea ecx, [ebp - 8]
push ecx
push eax
call dword [sym.imp.VERSION.dll_GetFileVersionInfoSizeA]
mov dword [ebp - 0x18], eax
test eax, eax
je 0x41e1d0
push 0x61c034
push eax
call fcn.0055b2c3
mov dword [ebp - 0x1c], eax
pop ecx
pop ecx
test eax, eax
je 0x41e1d0
cmp dword [esi + 0x14], 0x10
jb 0x41e117
mov esi, dword [esi]
push eax
push dword [ebp - 0x18]
push dword [ebp - 8]
push esi
call dword [sym.imp.VERSION.dll_GetFileVersionInfoA]
mov esi, dword [ebp - 0x1c]
test eax, eax
je 0x41e1be
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x14]
push eax
push str.VarFileInfoTranslation
push esi
call dword [sym.imp.VERSION.dll_VerQueryValueA]
test eax, eax
je 0x41e1be
mov eax, dword [ebp - 0x14]
push 0x61c034
push 0x80
movzx ecx, word [eax]
movzx eax, word [eax + 2]
shl ecx, 0x10
or ecx, eax
mov dword [ebp - 0x18], ecx
call fcn.0055b2c3
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x41e1be
mov eax, dword [ebp - 0x20]
cmp dword [eax + 0x14], 0x10
jb 0x41e17c
mov eax, dword [eax]
push eax
push dword [ebp - 0x18]
push str.StringFileInfo_08lx_s
push 0x80
push edi
call fcn.00559f1c
add esp, 0x14
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
push edi
push esi
call dword [sym.imp.VERSION.dll_VerQueryValueA]
test eax, eax
je 0x41e1bc
push dword [ebp - 0x10]
call fcn.004035bd
pop ecx
mov ecx, dword [ebp - 0x24]
push eax
push dword [ebp - 0x10]
call fcn.0040428c
mov bl, 1
push esi
call fcn.004317a8
pop ecx
test edi, edi
je 0x41e1d0
push edi
call fcn.004317a8
pop ecx
mov ecx, dword [ebp - 4]
mov al, bl
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00559612
mov esp, ebp
pop ebp
ret

Function at 0x41e35d
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x41e36c
xor al, al
ret
shr al, 4
and al, 1
ret
Function at 0x41f9ee
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x598115
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x60f490]
xor eax, esp
mov dword [esp + 0x30], eax
push ebx
push esi
push edi
mov eax, dword [0x60f490]
xor eax, esp
push eax
lea eax, [esp + 0x48]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0x10], esi
mov edi, dword [ebp + 8]
or ebx, 0xffffffff
cmp edi, ebx
jne 0x41fa3c
xor eax, eax
jmp 0x41fbb8
mov eax, dword [esi + 0x20]
mov ecx, dword [eax]
test ecx, ecx
je 0x41fa66
mov edx, dword [esi + 0x30]
mov eax, dword [edx]
add eax, ecx
cmp ecx, eax
jae 0x41fa66
dec dword [edx]
mov edx, dword [esi + 0x20]
mov eax, dword [ebp + 8]
mov esi, dword [edx]
lea ecx, [esi + 1]
mov dword [edx], ecx
mov byte [esi], al
jmp 0x41fbb8
cmp dword [esi + 0x50], 0
je 0x41fbb6
mov ecx, esi
call fcn.00420535
xor ecx, ecx
cmp dword [esi + 0x40], ecx
jne 0x41fa93
push dword [esi + 0x50]
push edi
call fcn.0041e207
test al, al
pop ecx
pop ecx
cmovne ebx, edi
jmp 0x41fbb6
mov eax, dword [ebp + 8]
push ecx
mov dword [esp + 0x3c], ecx
mov byte [esp + 0x2c], cl
lea ecx, [esp + 0x2c]
push 8
mov byte [esp + 0x2c], al
mov dword [esp + 0x44], 0xf
call fcn.004045f6
and dword [esp + 0x50], 0
lea eax, [esi + 0x48]
mov dword [esp + 0x18], eax
mov edi, dword [esp + 0x3c]
mov esi, dword [esi + 0x40]
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x3c]
lea ecx, [esp + 0x2c]
cmp edi, 0x10
lea edx, [esp + 0x2c]
mov edi, dword [esi]
cmovae ecx, dword [esp + 0x2c]
cmovae edx, dword [esp + 0x2c]
add eax, ecx
push eax
push edx
lea eax, [esp + 0x2c]
mov ecx, esi
push eax
lea eax, [esp + 0x35]
push eax
lea eax, [esp + 0x38]
push eax
push dword [esp + 0x30]
call dword [edi + 0x1c]
test eax, eax
js 0x41fba9
cmp eax, 1
jg 0x41fb8c
mov edi, dword [esp + 0x3c]
lea eax, [esp + 0x28]
mov ecx, dword [esp + 0x28]
cmp edi, 0x10
mov edx, dword [esp + 0x1c]
mov esi, dword [esp + 0x10]
cmovae eax, ecx
sub edx, eax
mov dword [esp + 0x14], edx
je 0x41fb59
push dword [esi + 0x50]
cmp edi, 0x10
lea eax, [esp + 0x2c]
push edx
cmovae eax, ecx
push 1
push eax
call fcn.0055c38b
mov edx, dword [esp + 0x24]
add esp, 0x10
cmp edx, eax
jne 0x41fba9
mov edi, dword [esp + 0x3c]
lea eax, [esp + 0x24]
mov byte [esi + 0x45], 1
cmp dword [esp + 0x20], eax
jne 0x41fb87
test edx, edx
jne 0x41fac6
cmp dword [esp + 0x38], 0x20
jae 0x41fba9
push edx
push 8
lea ecx, [esp + 0x30]
call fcn.0041a342
jmp 0x41fac2
mov ebx, dword [ebp + 8]
jmp 0x41fba9
cmp eax, 3
jne 0x41fba9
mov eax, dword [esp + 0x10]
push dword [eax + 0x50]
push dword [esp + 0x28]
call fcn.0041e207
test al, al
pop ecx
cmovne ebx, dword [ebp + 8]
pop ecx
push 0
push 1
lea ecx, [esp + 0x30]
call fcn.00404102
mov eax, ebx
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.00559612
mov esp, ebp
pop ebp
ret 4
Function at 0x4203b0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x598bb9
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x60f490]
xor eax, esp
mov dword [esp + 0x20], eax
push ebx
push esi
push edi
mov eax, dword [0x60f490]
xor eax, esp
push eax
lea eax, [esp + 0x38]
mov dword fs:[0], eax
mov ebx, ecx
cmp dword [ebx + 0x40], 0
je 0x4204ea
cmp byte [ebx + 0x45], 0
je 0x4204ea
mov eax, dword [ebx]
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
jne 0x420410
xor al, al
jmp 0x4204ec
xor eax, eax
mov dword [esp + 0x2c], 0xf
push eax
push 8
lea ecx, [esp + 0x20]
mov dword [esp + 0x30], eax
mov byte [esp + 0x20], al
call fcn.004045f6
and dword [esp + 0x40], 0
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x2c]
cmp ecx, 0x10
lea eax, [esp + 0x14]
mov ecx, dword [ebx + 0x40]
lea edi, [esp + 0x18]
push eax
mov eax, dword [esp + 0x2c]
lea esi, [esp + 0x1c]
cmovae edi, edx
cmovae esi, edx
mov edx, dword [ecx]
add eax, edi
push eax
push esi
lea eax, [ebx + 0x48]
push eax
call dword [edx + 0x20]
sub eax, 0
je 0x420475
dec eax
je 0x420479
dec eax
dec eax
je 0x4204d7
xor bl, bl
jmp 0x4204d9
mov byte [ebx + 0x45], 0
mov ecx, dword [esp + 0x2c]
lea eax, [esp + 0x18]
mov edx, dword [esp + 0x18]
cmp ecx, 0x10
mov esi, dword [esp + 0x14]
cmovae eax, edx
sub esi, eax
je 0x4204b8
push dword [ebx + 0x50]
cmp ecx, 0x10
lea eax, [esp + 0x1c]
push esi
cmovae eax, edx
push 1
push eax
call fcn.0055c38b
add esp, 0x10
cmp esi, eax
jne 0x420471
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x18]
cmp byte [ebx + 0x45], 0
je 0x4204d7
test esi, esi
jne 0x42043b
push esi
push 8
lea ecx, [esp + 0x20]
call fcn.0041a342
jmp 0x420433
mov bl, 1
push 0
push 1
lea ecx, [esp + 0x20]
call fcn.00404102
mov al, bl
jmp 0x4204ec
mov al, 1
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.00559612
mov esp, ebp
pop ebp
ret
Function at 0x421a0d
Capabilities:
Resolve dns

Disassembly:
push 0x3c
mov eax, 0x598dc3
call fcn.0055d546
mov eax, ecx
mov dword [ebp - 0x30], eax
and dword [ebp - 4], 0
call fcn.0041360f
xor bl, bl
lea eax, [ebp + 8]
cmp dword [ebp + 0x1c], 0x10
cmovae eax, dword [ebp + 8]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x421aa7
mov eax, dword [eax + 0xc]
and dword [ebp - 0x28], 0
cmp dword [eax], 0
je 0x421aa9
inc bl
mov eax, dword [eax]
push dword [eax]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push 5
pop ecx
mov esi, eax
lea edi, [ebp - 0x24]
rep movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x48]
call fcn.00403e67
mov ecx, dword [ebp - 0x30]
lea eax, [ebp - 0x48]
push eax
mov byte [ebp - 4], 1
call fcn.00418a38
push 0
push 1
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 0
call fcn.00404102
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x28]
inc ecx
mov dword [ebp - 0x28], ecx
mov eax, dword [eax + 0xc]
lea eax, [eax + ecx*4]
cmp dword [eax], 0
jne 0x421a50
jmp 0x421aa9
xor bl, bl
push 0
push 1
lea ecx, [ebp + 8]
call fcn.00404102
mov al, bl
call fcn.0055d4f5
ret

Function at 0x424026
Capabilities:
Set socket configuration

Disassembly:
push 0xa8
mov eax, 0x59917e
call fcn.0055d546
mov esi, ecx
mov edi, dword [ebp + 8]
lea ecx, [ebp - 0x74]
xor ebx, ebx
mov dword [ebp - 0x84], ebx
call fcn.00407859
xor eax, eax
mov dword [ebp - 4], ebx
cmp byte [esi + 0x2a], al
push 4
setne al
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x24]
push eax
push 1
push 6
push dword [esi + 0xc]
call dword [sym.imp.WS2_32.dll_setsockopt]
mov eax, dword [esi + 0x3c]
mov dword [ebp - 0x20], 1
test eax, eax
je 0x424084
mov dword [ebp - 0x1c], eax
mov eax, dword [esi + 0x40]
mov dword [ebp - 0x18], eax
jmp 0x424092
mov dword [ebp - 0x1c], 0x124f80
mov dword [ebp - 0x18], 0x7d0
push ebx
push ebx
lea eax, [ebp - 0x28]
mov dword [ebp - 0x28], ebx
push eax
push 0xc
lea eax, [ebp - 0x80]
push eax
push 0xc
lea eax, [ebp - 0x20]
push eax
push 0x98000004
push dword [esi + 0xc]
call dword [sym.imp.WS2_32.dll_WSAIoctl]
cmp eax, 0xffffffff
jne 0x424110
mov byte [ebp - 0x74], bl
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea ecx, [ebp - 0x9c]
call fcn.00404a8f
push eax
mov edx, str.setKeepAlive_WSAIoctl_error:
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xb4]
call fcn.00404bfe
pop ecx
push eax
lea ecx, [ebp - 0x70]
call fcn.00407134
push ebx
push 1
lea ecx, [ebp - 0xb4]
call fcn.00404102
push ebx
push 1
lea ecx, [ebp - 0x9c]
mov byte [ebp - 4], bl
call fcn.00404102
jmp 0x42412a
mov esi, 0x5e1685
mov byte [ebp - 0x74], 1
push esi
call fcn.004035bd
pop ecx
push eax
push esi
lea ecx, [ebp - 0x70]
call fcn.0040428c
lea eax, [ebp - 0x74]
mov ecx, edi
push eax
call fcn.0040cfee
lea ecx, [ebp - 0x74]
call fcn.0040540b
mov eax, edi
call fcn.0055d4f5
ret 4
Function at 0x424147
Capabilities:
Set socket configuration

Disassembly:
push 0x10
mov eax, 0x5991bf
call fcn.0055d546
mov esi, ecx
mov edi, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 4], ebx
mov ecx, edi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], ebx
call fcn.00407859
mov dword [ebp - 4], ebx
xor eax, eax
inc ebx
cmp byte [esi + 0x2a], al
push 4
setne al
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
push ebx
push 6
push dword [esi + 0xc]
call dword [sym.imp.WS2_32.dll_setsockopt]
mov esi, 0x5e1685
mov byte [edi], bl
push esi
call fcn.004035bd
pop ecx
push eax
push esi
lea ecx, [edi + 4]
call fcn.0040428c
mov eax, edi
call fcn.0055d4f5
ret 4
Function at 0x4241b0
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x599218
mov eax, dword fs:[0]
push eax
sub esp, 0xd0
mov eax, dword [0x60f490]
xor eax, esp
mov dword [esp + 0xc8], eax
push ebx
push esi
push edi
mov eax, dword [0x60f490]
xor eax, esp
push eax
lea eax, [esp + 0xe0]
mov dword fs:[0], eax
mov esi, ecx
mov edi, dword [ebp + 8]
lea ecx, [esp + 0x8c]
xor ebx, ebx
mov dword [esp + 0x28], ebx
mov byte [esi + 0x44], bl
call fcn.00407859
push ebx
push 1
push 2
pop eax
push eax
mov dword [esp + 0xf4], ebx
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 0xc], eax
cmp eax, 0xffffffff
jne 0x42428e
mov byte [esp + 0x8c], bl
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov dword [esp + 0xc0], eax
lea ecx, [esp + 0x10]
call fcn.00404a8f
push eax
mov edx, str.create_socket_error:
mov byte [esp + 0xec], 1
lea ecx, [esp + 0x30]
call fcn.00404bfe
pop ecx
push eax
lea ecx, [esp + 0x94]
call fcn.00407134
push ebx
push 1
lea ecx, [esp + 0x34]
call fcn.00404102
push ebx
push 1
lea ecx, [esp + 0x18]
mov byte [esp + 0xf0], bl
call fcn.00404102
jmp 0x4243dd
lea eax, [esp + 0x44]
mov ecx, esi
push eax
call fcn.00424026
push eax
lea ecx, [esp + 0x90]
mov byte [esp + 0xec], 2
call fcn.004086bb
lea ecx, [esp + 0x44]
mov byte [esp + 0xe8], bl
call fcn.0040540b
cmp byte [esp + 0x8c], 0
je 0x4243dd
lea eax, [esp + 0x44]
mov ecx, esi
push eax
call fcn.00424147
lea ecx, [esp + 0x44]
call fcn.0040540b
push 0x10
call fcn.00431772
pop ecx
mov ebx, eax
push 2
pop eax
mov word [ebx], ax
movzx ecx, word [esi + 0x28]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebx + 2], ax
lea eax, [esi + 0x10]
cmp dword [eax + 0x14], 0x10
jb 0x42430c
mov eax, dword [eax]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
push 0x10
push ebx
mov dword [ebx + 4], eax
push dword [esi + 0xc]
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x424356
mov byte [esp + 0x8c], 0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov dword [esp + 0xc0], eax
lea ecx, [esp + 0x2c]
call fcn.00404a8f
mov byte [esp + 0xe8], 3
mov edx, str.bind_error:
jmp 0x424393
push 0x14
push dword [esi + 0xc]
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x4243d6
mov byte [esp + 0x8c], 0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
mov dword [esp + 0xc0], eax
lea ecx, [esp + 0x2c]
call fcn.00404a8f
mov byte [esp + 0xe8], 4
mov edx, str.listen_error:
push eax
lea ecx, [esp + 0x14]
call fcn.00404bfe
pop ecx
push eax
lea ecx, [esp + 0x94]
call fcn.00407134
push 0
push 1
lea ecx, [esp + 0x18]
call fcn.00404102
push 0
push 1
lea ecx, [esp + 0x34]
mov byte [esp + 0xf0], 0
call fcn.00404102
push dword [esi + 0xc]
call dword [sym.imp.WS2_32.dll_closesocket]
push ebx
call fcn.004317a8
pop ecx
lea eax, [esp + 0x8c]
mov ecx, edi
push eax
call fcn.0040cfee
lea ecx, [esp + 0x8c]
call fcn.0040540b
mov eax, edi
mov ecx, dword [esp + 0xe0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xc8]
xor ecx, esp
call fcn.00559612
mov esp, ebp
pop ebp
ret 4