joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402650
Capabilities:
Encode data using xor
Encrypt data using aes
Reference aes constants

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push ebx
call fcn.004024d0
pop ecx
test eax, eax
js 0x40282c
push esi
push edi
mov edi, dword [ebx + 0xf0]
shl edi, 2
test edi, edi
jle 0x4026bf
lea edx, [ebx + 8]
lea esi, [ebx + 8]
xor ebx, ebx
lea edx, [edx + edi*4]
mov ecx, dword [esi - 8]
add ebx, 4
mov eax, dword [edx - 8]
sub edi, 4
mov dword [esi - 8], eax
mov eax, dword [edx - 4]
mov dword [edx - 8], ecx
mov ecx, dword [esi - 4]
mov dword [esi - 4], eax
mov eax, dword [edx]
mov dword [edx - 4], ecx
mov ecx, dword [esi]
mov dword [esi], eax
lea esi, [esi + 0x10]
mov eax, dword [edx + 4]
mov dword [edx], ecx
lea edx, [edx - 0x10]
mov ecx, dword [esi - 0xc]
mov dword [esi - 0xc], eax
mov dword [edx + 0x14], ecx
cmp ebx, edi
jl 0x402680
mov ebx, dword [ebp + 8]
xor edi, edi
inc edi
cmp dword [ebx + 0xf0], edi
jle 0x402828
lea esi, [ebx + 2]
lea esi, [esi + 0x10]
mov edx, dword [esi - 2]
mov eax, edx
shr eax, 0x18
movzx ecx, byte [eax*4 + 0x5e3090]
movzx eax, byte [esi - 1]
mov ecx, dword [ecx*4 + 0x5e2490]
movzx eax, byte [eax*4 + 0x5e3090]
xor ecx, dword [eax*4 + 0x5e1c90]
movzx eax, byte [esi]
movzx eax, byte [eax*4 + 0x5e3090]
xor ecx, dword [eax*4 + 0x5e2090]
movzx eax, dl
mov edx, dword [esi + 2]
movzx eax, byte [eax*4 + 0x5e3090]
xor ecx, dword [eax*4 + 0x5e1890]
mov eax, edx
shr eax, 0x18
mov dword [esi - 2], ecx
movzx ecx, byte [eax*4 + 0x5e3090]
movzx eax, byte [esi + 3]
mov ecx, dword [ecx*4 + 0x5e2490]
movzx eax, byte [eax*4 + 0x5e3090]
xor ecx, dword [eax*4 + 0x5e1c90]
movzx eax, byte [esi + 4]
movzx eax, byte [eax*4 + 0x5e3090]
xor ecx, dword [eax*4 + 0x5e2090]
movzx eax, dl
mov edx, dword [esi + 6]
movzx eax, byte [eax*4 + 0x5e3090]
xor ecx, dword [eax*4 + 0x5e1890]
mov eax, edx
shr eax, 0x18
mov dword [esi + 2], ecx
movzx ecx, byte [eax*4 + 0x5e3090]
movzx eax, byte [esi + 7]
mov ecx, dword [ecx*4 + 0x5e2490]
movzx eax, byte [eax*4 + 0x5e3090]
xor ecx, dword [eax*4 + 0x5e1c90]
movzx eax, byte [esi + 8]
movzx eax, byte [eax*4 + 0x5e3090]
xor ecx, dword [eax*4 + 0x5e2090]
movzx eax, dl
mov edx, dword [esi + 0xa]
movzx eax, byte [eax*4 + 0x5e3090]
xor ecx, dword [eax*4 + 0x5e1890]
mov eax, edx
shr eax, 0x18
mov dword [esi + 6], ecx
movzx ecx, byte [eax*4 + 0x5e3090]
movzx eax, byte [esi + 0xb]
mov ecx, dword [ecx*4 + 0x5e2490]
movzx eax, byte [eax*4 + 0x5e3090]
xor ecx, dword [eax*4 + 0x5e1c90]
movzx eax, byte [esi + 0xc]
movzx eax, byte [eax*4 + 0x5e3090]
xor ecx, dword [eax*4 + 0x5e2090]
movzx eax, dl
movzx eax, byte [eax*4 + 0x5e3090]
xor ecx, dword [eax*4 + 0x5e1890]
inc edi
mov dword [esi + 0xa], ecx
cmp edi, dword [ebx + 0xf0]
jl 0x4026d1
pop edi
xor eax, eax
pop esi
pop ebx
pop ebp
ret
Function at 0x403b9e
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5958fb
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push esi
mov eax, dword [0x60f490]
xor eax, esp
push eax
lea eax, [esp + 0x28]
mov dword fs:[0], eax
mov esi, ecx
push dword [ebp + 0x10]
lea ecx, [esp + 0x10]
call fcn.00403e34
and dword [esp + 0x30], 0
lea eax, [esp + 0xc]
push eax
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call fcn.00403b3d
push 0
push 1
lea ecx, [esp + 0x14]
call fcn.004040cf
mov dword [esi], vtable.std::system_error.0
mov eax, esi
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop esi
mov esp, ebp
pop ebp
ret 0xc
Function at 0x410107
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x59714e
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 ebx, edx
mov dword [esp + 0x14], ebx
mov edi, ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push str.MYDATA
movzx edx, bx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
test esi, esi
jne 0x410246
sub esp, 0x18
mov ecx, esp
mov dword [esp + 0x2c], esp
push 0x5e1685
call fcn.00403e34
and dword [esp + 0x100], esi
lea ecx, [esp + 0x90]
mov edx, dword [esp + 0x28]
call fcn.00404a5c
mov esi, eax
mov edx, ebx
mov byte [esp + 0x100], 1
lea ecx, [esp + 0x30]
call fcn.00404aa3
push eax
mov edx, str.FindResource_err
mov byte [esp + 0x104], 2
lea ecx, [esp + 0x64]
call fcn.00404bcb
mov byte [esp + 0x104], 3
lea ecx, [esp + 0xc4]
mov edx, eax
mov dword [esp], str.ierr
call fcn.00404bfb
sub esp, 0x14
mov byte [esp + 0x118], 4
mov ecx, esp
mov edx, eax
push esi
call fcn.00404c2d
pop ecx
mov byte [esp + 0x118], 8
call fcn.0042fb9f
add esp, 0x30
lea ecx, [esp + 0xa8]
xor esi, esi
xor ebx, ebx
inc ebx
push esi
push ebx
call fcn.004040cf
push esi
push ebx
lea ecx, [esp + 0x50]
call fcn.004040cf
push esi
push ebx
lea ecx, [esp + 0x20]
call fcn.004040cf
lea ecx, [esp + 0x78]
jmp 0x410340
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 0x410273
test ebx, ebx
je 0x410273
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [edi], eax
mov dword [edi + 4], ebx
jmp 0x41034c
sub esp, 0x18
mov ecx, esp
mov dword [esp + 0x28], esp
push 0x5e1685
call fcn.00403e34
mov edx, ebx
mov dword [esp + 0x100], 9
lea ecx, [esp + 0xd8]
call fcn.0040ff03
mov esi, eax
mov byte [esp + 0x100], 0xa
lea ecx, [esp + 0xa8]
mov edx, dword [esp + 0x2c]
call fcn.00404aa3
push eax
mov edx, str.FindResource_err
mov byte [esp + 0x104], 0xb
lea ecx, [esp + 0x7c]
call fcn.00404bcb
mov byte [esp + 0x104], 0xc
lea ecx, [esp + 0x4c]
mov edx, eax
mov dword [esp], str.nResSize
call fcn.00404bfb
sub esp, 0x14
mov byte [esp + 0x118], 0xd
mov ecx, esp
mov edx, eax
push esi
call fcn.00404c2d
pop ecx
mov byte [esp + 0x118], 0x11
call fcn.0042fb9f
add esp, 0x30
lea ecx, [esp + 0x30]
xor esi, esi
xor ebx, ebx
inc ebx
push esi
push ebx
call fcn.004040cf
push esi
push ebx
lea ecx, [esp + 0x68]
call fcn.004040cf
push esi
push ebx
lea ecx, [esp + 0x98]
call fcn.004040cf
lea ecx, [esp + 0xc0]
push esi
push ebx
call fcn.004040cf
mov dword [edi + 4], esi
mov dword [edi], esi
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.005597ea
mov esp, ebp
pop ebp
ret
Function at 0x410ca6
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push 0xcc
mov eax, 0x5973d0
call fcn.0055d756
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 0x410d8c
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x14], esp
push 0x5e1685
call fcn.00403e34
and dword [ebp - 4], esi
lea ecx, [ebp - 0x90]
mov edx, ebx
call fcn.00404a5c
mov esi, eax
xor ebx, ebx
lea ecx, [ebp - 0x30]
inc ebx
mov edx, 0x85
mov byte [ebp - 4], bl
call fcn.00404aa3
push eax
mov edx, str.FindResource_err
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x60]
call fcn.00404bcb
mov byte [ebp - 4], 3
lea ecx, [ebp - 0xc0]
mov edx, eax
mov dword [esp], str._ierr
call fcn.00404bfb
sub esp, 0x14
mov byte [ebp - 4], 4
mov ecx, esp
mov edx, eax
push esi
call fcn.00404c2d
pop ecx
mov byte [ebp - 4], 8
call fcn.0042fb9f
add esp, 0x30
lea ecx, [ebp - 0xc0]
xor esi, esi
push esi
push ebx
call fcn.004040cf
push esi
push ebx
lea ecx, [ebp - 0x60]
call fcn.004040cf
push esi
push ebx
lea ecx, [ebp - 0x30]
call fcn.004040cf
lea ecx, [ebp - 0x90]
jmp 0x410e66
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 0x410db9
test ebx, ebx
je 0x410db9
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [edi], eax
mov dword [edi + 4], ebx
jmp 0x410e72
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x18], esp
push 0x5e1685
call fcn.00403e34
mov edx, ebx
mov dword [ebp - 4], 9
lea ecx, [ebp - 0xd8]
call fcn.0040ff03
mov esi, eax
mov edx, 0x85
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0xa8]
call fcn.00404aa3
push eax
mov edx, str.FindResource_err
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x78]
call fcn.00404bcb
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x48]
mov edx, eax
mov dword [esp], str._nResSize
call fcn.00404bfb
sub esp, 0x14
mov byte [ebp - 4], 0xd
mov ecx, esp
mov edx, eax
push esi
call fcn.00404c2d
pop ecx
mov byte [ebp - 4], 0x11
call fcn.0042fb9f
add esp, 0x30
lea ecx, [ebp - 0x48]
xor esi, esi
xor ebx, ebx
inc ebx
push esi
push ebx
call fcn.004040cf
push esi
push ebx
lea ecx, [ebp - 0x78]
call fcn.004040cf
push esi
push ebx
lea ecx, [ebp - 0xa8]
call fcn.004040cf
lea ecx, [ebp - 0xd8]
push esi
push ebx
call fcn.004040cf
mov dword [edi + 4], esi
mov dword [edi], esi
mov eax, edi
call fcn.0055d705
ret
Function at 0x412b6b
Capabilities:
Accept command line arguments

Disassembly:
push 0x2c
mov eax, 0x59795d
call fcn.0055d756
mov esi, ecx
xor edi, edi
mov dword [ebp - 4], edi
push 0x5e1685
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], edi
call fcn.00403e34
lea eax, [ebp - 0x18]
mov dword [ebp - 4], edi
push eax
mov dword [ebp - 0x1c], 1
mov dword [ebp - 0x18], edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
cmp dword [ebp - 0x18], 2
jl 0x412bd0
mov edx, dword [eax + 4]
lea ecx, [ebp - 0x38]
call fcn.00417a21
push eax
mov ecx, esi
call fcn.00407101
push edi
push 1
lea ecx, [ebp - 0x38]
call fcn.004040cf
mov eax, esi
call fcn.0055d705
ret

Function at 0x413f3f
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 0x42df9b
cmp byte [ecx + 0x60], 0
je 0x42df9b
mov byte [ecx + 0x60], 0
jmp fcn.0042df9d
ret
Function at 0x416eb7
Capabilities:
Check os version
Get system information on windows

Disassembly:
push 0x14c
mov eax, 0x597f19
call fcn.0055d756
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.00403e34
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.0040358a
pop ecx
push eax
push edi
mov ecx, esi
call fcn.00404259
lea eax, [ebp - 0x150]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x41704d
mov eax, dword [ebp - 0x14c]
sub eax, 4
je 0x416ffd
dec eax
je 0x416fa3
dec eax
jne 0x41704d
mov eax, dword [ebp - 0x148]
sub eax, ebx
je 0x416f89
dec eax
je 0x416f6f
dec eax
jne 0x41704d
cmp byte [ebp - 0x36], 1
jne 0x41704d
mov edi, str.Microsoft_Windows_10
jmp 0x41703d
cmp byte [ebp - 0x36], 1
jne 0x416f7f
mov edi, str.Microsoft_Windows_7
jmp 0x41703d
mov edi, str.Microsoft_Windows_Server_2008_R2
jmp 0x41703d
cmp byte [ebp - 0x36], 1
jne 0x416f99
mov edi, str.Microsoft_Windows_Vista
jmp 0x41703d
mov edi, str.Microsoft_Windows_Server_2008
jmp 0x41703d
mov eax, dword [ebp - 0x148]
sub eax, ebx
je 0x416ff6
dec eax
je 0x416fef
dec eax
jne 0x41704d
cmp byte [ebp - 0x36], 1
jne 0x416fcb
cmp word [ebp - 0x34], 9
jne 0x416fcb
mov edi, str.Microsoft_Windows_XP_Professional_x64_Edition
jmp 0x41703d
mov edi, dword [sym.imp.USER32.dll_GetSystemMetrics]
push 0x59
call edi
test eax, eax
jne 0x416fe0
mov edi, str.Microsoft_Windows_Server_2003
jmp 0x41703d
push 0x59
call edi
test eax, eax
je 0x41704d
mov edi, str.Microsoft_Windows_Server_2003_R2
jmp 0x41703d
mov edi, str.Microsoft_Windows_XP
jmp 0x41703d
mov edi, str.Microsoft_Windows_2000
jmp 0x41703d
mov eax, dword [ebp - 0x148]
test eax, eax
je 0x41701f
cmp eax, 0xa
je 0x417018
cmp eax, 0x5a
jne 0x41704d
mov edi, str.Microsoft_Windows_Me
jmp 0x41703d
mov edi, str.Microsoft_Windows_98
jmp 0x41703d
cmp dword [ebp - 0x140], 2
jne 0x41702f
mov edi, str.Microsoft_Windows_NT_4.0
jmp 0x41703d
cmp dword [ebp - 0x140], 1
jne 0x41704d
mov edi, str.Microsoft_Windows_95
push edi
call fcn.0040358a
pop ecx
push eax
push edi
mov ecx, esi
call fcn.00404259
mov eax, esi
call fcn.0055d705
ret
Function at 0x417322
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 0x417426
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 0x417350
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 0x417373
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 0x417395
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 0x4173bf
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 0x417424
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 0x417424
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 0x41733f
pop edi
pop ebx
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x41dec1
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 0x41dff0
cmp dword [esi + 0x10], ebx
je 0x41dff0
cmp dword [esi + 0x14], 0x10
jb 0x41deff
mov eax, dword [esi]
jmp 0x41df01
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 0x41dff0
push 0x61bff4
push eax
call fcn.0055b4d5
mov dword [ebp - 0x1c], eax
pop ecx
pop ecx
test eax, eax
je 0x41dff0
cmp dword [esi + 0x14], 0x10
jb 0x41df37
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 0x41dfde
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 0x41dfde
mov eax, dword [ebp - 0x14]
push 0x61bff4
push 0x80
movzx ecx, word [eax]
movzx eax, word [eax + 2]
shl ecx, 0x10
or ecx, eax
mov dword [ebp - 0x18], ecx
call fcn.0055b4d5
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x41dfde
mov eax, dword [ebp - 0x20]
cmp dword [eax + 0x14], 0x10
jb 0x41df9c
mov eax, dword [eax]
push eax
push dword [ebp - 0x18]
push str.StringFileInfo_08lx_s
push 0x80
push edi
call fcn.0055a0ec
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 0x41dfdc
push dword [ebp - 0x10]
call fcn.0040358a
pop ecx
mov ecx, dword [ebp - 0x24]
push eax
push dword [ebp - 0x10]
call fcn.00404259
mov bl, 1
push esi
call fcn.00431987
pop ecx
test edi, edi
je 0x41dff0
push edi
call fcn.00431987
pop ecx
mov ecx, dword [ebp - 4]
mov al, bl
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005597ea
mov esp, ebp
pop ebp
ret

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

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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x59830e
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 0x41f85c
xor eax, eax
jmp 0x41f9d8
mov eax, dword [esi + 0x20]
mov ecx, dword [eax]
test ecx, ecx
je 0x41f886
mov edx, dword [esi + 0x30]
mov eax, dword [edx]
add eax, ecx
cmp ecx, eax
jae 0x41f886
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 0x41f9d8
cmp dword [esi + 0x50], 0
je 0x41f9d6
mov ecx, esi
call fcn.00420355
xor ecx, ecx
cmp dword [esi + 0x40], ecx
jne 0x41f8b3
push dword [esi + 0x50]
push edi
call fcn.0041e027
test al, al
pop ecx
pop ecx
cmovne ebx, edi
jmp 0x41f9d6
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.004045c3
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 0x41f9c9
cmp eax, 1
jg 0x41f9ac
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 0x41f979
push dword [esi + 0x50]
cmp edi, 0x10
lea eax, [esp + 0x2c]
push edx
cmovae eax, ecx
push 1
push eax
call fcn.0055c59d
mov edx, dword [esp + 0x24]
add esp, 0x10
cmp edx, eax
jne 0x41f9c9
mov edi, dword [esp + 0x3c]
lea eax, [esp + 0x24]
mov byte [esi + 0x45], 1
cmp dword [esp + 0x20], eax
jne 0x41f9a7
test edx, edx
jne 0x41f8e6
cmp dword [esp + 0x38], 0x20
jae 0x41f9c9
push edx
push 8
lea ecx, [esp + 0x30]
call fcn.0041a162
jmp 0x41f8e2
mov ebx, dword [ebp + 8]
jmp 0x41f9c9
cmp eax, 3
jne 0x41f9c9
mov eax, dword [esp + 0x10]
push dword [eax + 0x50]
push dword [esp + 0x28]
call fcn.0041e027
test al, al
pop ecx
cmovne ebx, dword [ebp + 8]
pop ecx
push 0
push 1
lea ecx, [esp + 0x30]
call fcn.004040cf
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.005597ea
mov esp, ebp
pop ebp
ret 4
Function at 0x4201d0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x598db2
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 0x42030a
cmp byte [ebx + 0x45], 0
je 0x42030a
mov eax, dword [ebx]
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
jne 0x420230
xor al, al
jmp 0x42030c
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.004045c3
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 0x420295
dec eax
je 0x420299
dec eax
dec eax
je 0x4202f7
xor bl, bl
jmp 0x4202f9
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 0x4202d8
push dword [ebx + 0x50]
cmp ecx, 0x10
lea eax, [esp + 0x1c]
push esi
cmovae eax, edx
push 1
push eax
call fcn.0055c59d
add esp, 0x10
cmp esi, eax
jne 0x420291
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x18]
cmp byte [ebx + 0x45], 0
je 0x4202f7
test esi, esi
jne 0x42025b
push esi
push 8
lea ecx, [esp + 0x20]
call fcn.0041a162
jmp 0x420253
mov bl, 1
push 0
push 1
lea ecx, [esp + 0x20]
call fcn.004040cf
mov al, bl
jmp 0x42030c
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.005597ea
mov esp, ebp
pop ebp
ret
Function at 0x42182d
Capabilities:
Resolve dns

Disassembly:
push 0x3c
mov eax, 0x598fbc
call fcn.0055d756
mov eax, ecx
mov dword [ebp - 0x30], eax
and dword [ebp - 4], 0
call fcn.0041346c
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 0x4218c7
mov eax, dword [eax + 0xc]
and dword [ebp - 0x28], 0
cmp dword [eax], 0
je 0x4218c9
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.00403e34
mov ecx, dword [ebp - 0x30]
lea eax, [ebp - 0x48]
push eax
mov byte [ebp - 4], 1
call fcn.00418858
push 0
push 1
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 0
call fcn.004040cf
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 0x421870
jmp 0x4218c9
xor bl, bl
push 0
push 1
lea ecx, [ebp + 8]
call fcn.004040cf
mov al, bl
call fcn.0055d705
ret

Function at 0x42416d
Capabilities:
Set socket configuration

Disassembly:
push 0xa8
mov eax, 0x599375
call fcn.0055d756
mov esi, ecx
mov edi, dword [ebp + 8]
lea ecx, [ebp - 0x74]
xor ebx, ebx
mov dword [ebp - 0x84], ebx
call fcn.00407826
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 0x4241cb
mov dword [ebp - 0x1c], eax
mov eax, dword [esi + 0x40]
mov dword [ebp - 0x18], eax
jmp 0x4241d9
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 0x424257
mov byte [ebp - 0x74], bl
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea ecx, [ebp - 0x9c]
call fcn.00404a5c
push eax
mov edx, str.setKeepAlive_WSAIoctl_error:
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xb4]
call fcn.00404bcb
pop ecx
push eax
lea ecx, [ebp - 0x70]
call fcn.00407101
push ebx
push 1
lea ecx, [ebp - 0xb4]
call fcn.004040cf
push ebx
push 1
lea ecx, [ebp - 0x9c]
mov byte [ebp - 4], bl
call fcn.004040cf
jmp 0x424271
mov esi, 0x5e1685
mov byte [ebp - 0x74], 1
push esi
call fcn.0040358a
pop ecx
push eax
push esi
lea ecx, [ebp - 0x70]
call fcn.00404259
lea eax, [ebp - 0x74]
mov ecx, edi
push eax
call fcn.0040cf8f
lea ecx, [ebp - 0x74]
call fcn.004053d8
mov eax, edi
call fcn.0055d705
ret 4