joyce8/EMBER2024-capa huggingface dataset:
Function at 0xa791b0
Capabilities:
Acquire debug privileges

Disassembly:
push ecx
lea eax, [esp]
mov dword [esp], 0
push eax
push 0x20
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp]
push 1
push str.SeBackupPrivilege
push ecx
call fcn.00a79140
mov edx, dword [esp + 0xc]
push 1
push str.SeDebugPrivilege
push edx
call fcn.00a79140
mov eax, dword [esp + 0x18]
push 1
push str.SeRestorePrivilege
push eax
call fcn.00a79140
mov ecx, dword [esp + 0x24]
push 1
push str.SeSecurityPrivilege
push ecx
call fcn.00a79140
mov edx, dword [esp + 0x30]
add esp, 0x30
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
pop ecx
ret

Function at 0xa79bfa
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
lea eax, [ebp - 4]
push eax
push 0x20019
xor esi, esi
push esi
push str.CLSIDADB880A6_D8FF_11CF_9377_00AA003B7A11InprocServer32
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0xa79c50
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
mov dword [ebp - 8], 0x104
push esi
push esi
push 0xa8b87c
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0xa79c43
inc esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
jmp 0xa79c52
xor eax, eax
pop esi
leave
ret 4

Function at 0x430000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
call 0x43000c
nop
nop
nop
nop
pop eax
nop
nop
add eax, 0x403d6f
nop
sub eax, 0x403d15
nop
nop
nop
nop
mov ebx, dword [eax]
mov ecx, dword [eax + 4]
nop
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
nop
nop
xor dword [ebx], edx
nop
add ebx, 4
nop
nop
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
nop
nop
jl 0x430030
nop
nop
add eax, 0xc
nop
nop
nop
cmp dword [eax], 0
nop
nop
nop
nop
jne 0x43001e
nop
nop
nop
nop
nop
nop
popal
nop
jmp fcn.00401219
Function at 0x40a490
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x65e374]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 0x1c], 0x10
lea ecx, [ebp - 0x10]
push ebx
lea eax, [ebp + 8]
mov dword [ebp - 8], 0
cmovae eax, dword [ebp + 8]
push ecx
push eax
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0xc
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov edx, dword [ebp + 0x1c]
test eax, eax
setne bl
cmp edx, 0x10
jb 0x40a501
mov ecx, dword [ebp + 8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40a4f7
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40a512
push edx
push ecx
call fcn.005b8996
add esp, 8
mov ecx, dword [ebp - 4]
mov al, bl
xor ecx, ebp
pop ebx
call fcn.005b8427
mov esp, ebp
pop ebp
ret
call fcn.005d36fe
int3

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

Disassembly:
push ebp
mov ebp, esp
cmp dword [ebp + 0x1c], 0x10
lea eax, [ebp + 8]
push ebx
cmovae eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40a933
test al, 0x10
jne 0x40a933
mov bl, 1
jmp 0x40a935
xor bl, bl
mov edx, dword [ebp + 0x1c]
cmp edx, 0x10
jb 0x40a965
mov ecx, dword [ebp + 8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40a95b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40a96a
push edx
push ecx
call fcn.005b8996
add esp, 8
mov al, bl
pop ebx
pop ebp
ret
call fcn.005d36fe
int3
Function at 0x40cd90
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5f8078
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x65e374]
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
push str.SCRIPTS
push 0x8c
push 0
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
je 0x40ce03
push edi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x2c], eax
push edi
test eax, eax
je 0x40cdfd
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
mov dword [ebp - 0x30], ebx
test ebx, ebx
jne 0x40ce3c
push edi
call dword [sym.imp.KERNEL32.dll_FreeResource]
xor bl, bl
mov edx, dword [ebp + 0x1c]
cmp edx, 0x10
jb 0x40cf80
mov ecx, dword [ebp + 8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40cf76
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40cf9e
jmp 0x40cf76
push ebx
call fcn.005b89cc
mov esi, eax
add esp, 4
test esi, esi
je 0x40ce5f
push ebx
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
push esi
call fcn.005cfab0
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_FreeResource]
movzx ecx, byte [esi + 8]
movzx eax, byte [esi + 7]
shl ecx, 8
add ecx, eax
movzx eax, byte [esi + 6]
shl ecx, 8
add ecx, eax
movzx eax, byte [esi + 5]
shl ecx, 8
add ecx, eax
mov dword [ebp - 0x2c], ecx
cmp ecx, 0x2faf080
jbe 0x40ce9e
push esi
call fcn.005b89c7
add esp, 4
jmp 0x40ce03
push ecx
call fcn.005b89cc
mov edi, eax
lea ecx, [esi + 0xd]
lea eax, [ebp - 0x34]
push eax
sub esp, 8
lea eax, [ebp - 0x30]
lea edx, [ebp - 0x2c]
push esi
push eax
push ecx
mov ecx, edi
call fcn.004b4d00
mov ecx, edi
mov dword [ebp - 0x18], 0
add esp, 0x1c
mov dword [ebp - 0x14], 0xf
mov ebx, eax
mov byte [ebp - 0x28], 0
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40cee0
sub ecx, edx
push ecx
push edi
lea ecx, [ebp - 0x28]
call fcn.00403030
sub esp, 0x18
mov byte [ebp - 4], 1
lea eax, [ebp - 0x28]
mov dword [ebp - 0x34], esp
mov ecx, esp
push eax
call fcn.00405df0
sub esp, 0x18
mov byte [ebp - 4], 2
lea eax, [ebp + 8]
mov ecx, esp
push eax
call fcn.00405df0
mov ecx, dword [ebp - 0x2c]
mov byte [ebp - 4], 1
call fcn.0040cfb0
push esi
call fcn.005b89c7
add esp, 0x34
push edi
call fcn.005b89c7
mov edx, dword [ebp - 0x14]
add esp, 4
test ebx, ebx
sete bl
cmp edx, 0x10
jb 0x40ce05
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40cf67
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40cfa3
push edx
push ecx
call fcn.005b8996
add esp, 8
jmp 0x40ce05
push edx
push ecx
call fcn.005b8996
add esp, 8
mov al, bl
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.005b8427
mov esp, ebp
pop ebp
ret
call fcn.005d36fe
call fcn.005d36fe
int3
Function at 0x40d930
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40c
mov eax, dword [0x65e374]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
xor edi, edi
mov esi, edx
cmp dword [ecx + 0x14], 0x10
mov dword [ebp - 0x408], edi
mov dword [ebp - 0x40c], edi
jb 0x40d95d
mov ecx, dword [ecx]
push 0x62e478
push ecx
lea eax, [ebp - 0x408]
push eax
call fcn.005d3864
add esp, 0xc
cmp dword [esi + 0x14], 0x10
jb 0x40d97a
mov esi, dword [esi]
push 0x62e47c
lea eax, [ebp - 0x40c]
push esi
push eax
call fcn.005d3864
mov esi, dword [ebp - 0x408]
add esp, 0xc
test esi, esi
je 0x40da8e
cmp dword [ebp - 0x40c], edi
je 0x40da7f
push 0x400
lea eax, [ebp - 0x404]
push 0
push eax
call fcn.005d05b0
push esi
push 0x400
push 1
lea eax, [ebp - 0x404]
push 0x400
push eax
call fcn.005d5b7e
mov esi, eax
add esp, 0x20
test esi, esi
je 0x40da3d
nop
push dword [ebp - 0x40c]
lea eax, [ebp - 0x404]
push esi
push 1
push eax
call fcn.005d7fd4
add esp, 0x10
cmp esi, eax
jne 0x40da38
push 0x400
lea eax, [ebp - 0x404]
push 0
push eax
call fcn.005d05b0
push dword [ebp - 0x408]
lea eax, [ebp - 0x404]
push 0x400
push 1
push 0x400
push eax
call fcn.005d5b7e
mov esi, eax
add esp, 0x20
test esi, esi
jne 0x40d9e0
jmp 0x40da3d
mov edi, 0xfffffffe
mov eax, dword [ebp - 0x408]
test eax, eax
je 0x40da5a
push eax
call fcn.005d3921
add esp, 4
mov dword [ebp - 0x408], 0
mov ecx, dword [ebp - 0x40c]
test ecx, ecx
je 0x40da6d
push ecx
call fcn.005d3921
add esp, 4
mov eax, edi
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b8427
mov esp, ebp
pop ebp
ret
push esi
call fcn.005d3921
add esp, 4
mov dword [ebp - 0x408], edi
mov eax, dword [ebp - 0x40c]
test eax, eax
je 0x40daa1
push eax
call fcn.005d3921
add esp, 4
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
xor ecx, ebp
pop esi
call fcn.005b8427
mov esp, ebp
pop ebp
ret

Function at 0x40dac0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5f81a8
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x65e374]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], ecx
mov dword [ebp - 4], 0
lea eax, [ebp + 8]
or edi, 0xffffffff
cmp dword [ebp + 0x1c], 0x10
push 0x62e480
cmovae eax, dword [ebp + 8]
push eax
call fcn.005d384d
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x40db5f
push 2
push 0
push ebx
call fcn.005d7570
push ebx
call fcn.005d699f
push ebx
mov edi, eax
call fcn.005d7cce
lea ecx, [edi + 1]
push ecx
call fcn.005b89cc
push ebx
push edi
mov esi, eax
push 1
push esi
call fcn.005d5b61
push ebx
mov byte [esi + edi], 0
call fcn.005d3921
mov ecx, dword [ebp - 0x10]
add esp, 0x2c
push edi
push esi
call fcn.00403030
push esi
call fcn.005b89c7
add esp, 4
mov edx, dword [ebp + 0x1c]
cmp edx, 0x10
jb 0x40db8f
mov ecx, dword [ebp + 8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40db85
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40dba3
push edx
push ecx
call fcn.005b8996
add esp, 8
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.005d36fe
int3
Function at 0x40e450
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
mov ebx, ecx
push esi
push edi
cmp dword [ebx + 0x38], 0
je 0x40e47b
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0040f170
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 + 0x18], esi
mov eax, dword [eax]
mov dword [esp + 0x1c], edi
mov dword [esp + 0x14], eax
test eax, eax
je 0x40e49d
mov eax, dword [ebx + 0x30]
mov eax, dword [eax]
jmp 0x40e49f
xor eax, eax
cdq
mov dword [esp + 0xc], eax
mov ecx, edx
mov dword [esp + 0x10], ecx
test edi, edi
jl 0x40e523
jg 0x40e4b4
test esi, esi
je 0x40e523
test ecx, ecx
jl 0x40e4fd
jg 0x40e4be
test eax, eax
je 0x40e4fd
cmp edi, ecx
jg 0x40e4d2
jl 0x40e4c8
cmp esi, eax
jae 0x40e4d2
mov eax, esi
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], edi
push eax
push dword [ebp + 8]
push dword [esp + 0x1c]
call fcn.005cfab0
mov ecx, dword [esp + 0x18]
add esp, 0xc
mov edx, dword [ebp + 8]
mov eax, dword [ebx + 0x30]
add edx, ecx
sub esi, ecx
sbb edi, dword [esp + 0x10]
sub dword [eax], ecx
mov eax, dword [ebx + 0x20]
add dword [eax], ecx
jmp 0x40e500
mov edx, dword [ebp + 8]
test edi, edi
jl 0x40e523
jg 0x40e50a
test esi, esi
je 0x40e523
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x40e523
push eax
push esi
push 1
push edx
call fcn.005d7fd4
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x40e540
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
push esi
push edi
mov edi, ecx
cmp dword [edi + 0x38], 0
je 0x40e56b
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0040f250
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [edi + 0x1c]
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x10]
mov dword [esp + 0x18], esi
mov eax, dword [eax]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x14], eax
test eax, eax
je 0x40e58d
mov eax, dword [edi + 0x2c]
mov eax, dword [eax]
jmp 0x40e58f
xor eax, eax
cdq
mov dword [esp + 0xc], eax
mov ecx, edx
mov dword [esp + 0x10], ecx
test ebx, ebx
jl 0x40e62e
jg 0x40e5ac
test esi, esi
je 0x40e62e
test ecx, ecx
jl 0x40e5f9
jg 0x40e5b6
test eax, eax
je 0x40e5f9
cmp ebx, ecx
jg 0x40e5ca
jl 0x40e5c0
cmp esi, eax
jae 0x40e5ca
mov eax, esi
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], ebx
push eax
push dword [esp + 0x18]
push dword [ebp + 8]
call fcn.005cfab0
mov ecx, dword [esp + 0x18]
add esp, 0xc
mov edx, dword [ebp + 8]
mov eax, dword [edi + 0x2c]
add edx, ecx
sub esi, ecx
mov dword [esp + 0xc], edx
sbb ebx, dword [esp + 0x10]
sub dword [eax], ecx
mov eax, dword [edi + 0x1c]
add dword [eax], ecx
jmp 0x40e600
mov eax, dword [ebp + 8]
mov dword [esp + 0xc], eax
test ebx, ebx
jl 0x40e62e
jg 0x40e60a
test esi, esi
je 0x40e62e
cmp dword [edi + 0x4c], 0
je 0x40e62e
mov ecx, edi
call fcn.0040f9d0
push dword [edi + 0x4c]
push esi
push 1
push dword [esp + 0x18]
call fcn.005d5b61
add esp, 0x10
sub esi, eax
sbb ebx, 0
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
sub eax, esi
pop edi
pop esi
sbb edx, ebx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x40e990
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x65e374]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x40e9c0
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b8427
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
push edi
mov ecx, dword [eax]
test ecx, ecx
je 0x40e9fc
mov edx, dword [esi + 0x30]
mov edi, dword [edx]
lea eax, [edi + ecx]
cmp ecx, eax
jae 0x40e9fc
lea ecx, [edi - 1]
mov dword [edx], ecx
mov edx, dword [esi + 0x20]
mov esi, dword [edx]
lea ecx, [esi + 1]
mov dword [edx], ecx
mov byte [esi], bl
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b8427
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
je 0x40eae3
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x40ea24
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 0x40ea57
push dword [esi + 0x4c]
movsx eax, bl
push eax
call fcn.005d69d3
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.005b8427
mov esp, ebp
pop ebp
ret 4
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x25], bl
mov edx, dword [ecx]
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 [edx + 0x1c]
test eax, eax
js 0x40eae3
cmp eax, 1
jle 0x40eab6
cmp eax, 3
jne 0x40eae3
push dword [esi + 0x4c]
movsx eax, byte [ebp - 0x25]
push eax
call fcn.005d69d3
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.005b8427
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x40ead3
push dword [esi + 0x4c]
push edi
push 1
push eax
call fcn.005d7fd4
add esp, 0x10
cmp edi, eax
jne 0x40eae3
lea eax, [ebp - 0x25]
mov byte [esi + 0x3d], 1
cmp dword [ebp - 0x30], eax
jne 0x40e9e7
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005b8427
mov esp, ebp
pop ebp
ret 4
Function at 0x40fa00
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x65e374]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
push edi
cmp dword [esi + 0x38], 0
je 0x40faa1
cmp byte [esi + 0x3d], 0
je 0x40faa1
mov eax, dword [esi]
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x40fa57
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
mov edx, dword [ecx]
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x40]
push eax
call dword [edx + 0x20]
sub eax, 0
je 0x40fa69
sub eax, 1
je 0x40fa6d
sub eax, 2
je 0x40faa1
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b8427
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x40fa8a
push dword [esi + 0x4c]
push edi
push 1
push eax
call fcn.005d7fd4
add esp, 0x10
cmp edi, eax
jne 0x40fa57
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b8427
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
pop edi
xor ecx, ebp
pop esi
call fcn.005b8427
mov esp, ebp
pop ebp
ret

Function at 0x410240
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5f8500
mov eax, dword fs:[0]
push eax
push esi
push edi
mov eax, dword [0x65e374]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
push 8
mov dword [edi], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
call fcn.005b86e9
mov esi, eax
xorps xmm0, xmm0
movq qword [esi], xmm0
push 1
mov dword [ebp - 4], 0
call fcn.0057ad79
mov dword [esi + 4], eax
lea ecx, [edi + 8]
lea eax, [edi + 4]
mov dword [edi + 0x34], esi
mov dword [edi + 0xc], eax
add esp, 8
lea eax, [edi + 0x14]
mov dword [edi + 0x10], ecx
mov dword [edi + 0x1c], eax
lea eax, [edi + 0x18]
mov dword [edi + 0x20], eax
lea eax, [edi + 0x24]
mov dword [edi + 0x2c], eax
lea eax, [edi + 0x28]
mov dword [edi + 0x30], eax
mov dword [ecx], 0
mov eax, dword [edi + 0x20]
mov dword [eax], 0
mov eax, dword [edi + 0x30]
mov dword [eax], 0
mov eax, dword [edi + 0xc]
mov dword [eax], 0
mov eax, dword [edi + 0x1c]
mov dword [eax], 0
mov eax, dword [edi + 0x2c]
mov dword [eax], 0
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x410d40
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5f85c8
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x65e374]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [ebp + 8]
lea edi, [esi + 8]
mov byte [esi + 4], 1
mov dword [ebp - 0x20], 0
mov dword [ebp - 4], 0
mov ecx, dword [eax + 0x24]
test ecx, ecx
je 0x410d96
mov eax, dword [ecx]
lea edx, [ebp - 0x44]
push edx
call dword [eax]
mov dword [ebp - 0x20], eax
push edi
lea ecx, [ebp - 0x44]
call fcn.00411250
mov dword [ebp - 4], 1
mov ecx, dword [ebp - 0x20]
test ecx, ecx
je 0x410dbe
mov edx, dword [ecx]
lea eax, [ebp - 0x44]
cmp ecx, eax
setne al
movzx eax, al
push eax
call dword [edx + 0x10]
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push eax
push 0
push esi
push 0x410ff0
push 0
push 0
call fcn.005d5fe0
add esp, 0x18
test eax, eax
je 0x410de8
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.005b8427
mov esp, ebp
pop ebp
ret 4
Function at 0x413520
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1a0
mov eax, dword [0x65e374]
xor eax, esp
mov dword [esp + 0x19c], eax
mov eax, dword [0x665454]
test eax, eax
jne 0x413559
lea eax, [esp + 8]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x413571
mov eax, dword [0x665454]
mov ecx, dword [esp + 0x19c]
inc eax
xor ecx, esp
mov dword [0x665454], eax
call fcn.005b8427
mov esp, ebp
pop ebp
ret
push 0x65ad88
lea eax, [esp + 8]
mov dword [esp + 8], str.Could_not_start_WSA
push eax
call fcn.005cfa3b
int3

Function at 0x413590
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, ecx
mov dword [esi], vtable.Socket.0
mov dword [esi + 4], 0
call fcn.00413520
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 4], eax
cmp eax, 0xffffffff
je 0x4135d7
push 4
call fcn.005b86e9
add esp, 4
mov dword [eax], 1
mov dword [esi + 8], eax
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret
push 0x65ad88
lea eax, [ebp - 4]
mov dword [ebp - 4], str.INVALID_SOCKET
push eax
call fcn.005cfa3b
int3
Function at 0x4136d0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5f8771
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x65e374]
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 dword [ebp - 0x34], ecx
mov edi, dword [ebp + 8]
mov ecx, edi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 4], 0
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x2c], 0
push 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0xf
push 0x6292df
mov dword [ebp - 0x30], eax
mov byte [edi], 0
call fcn.00403030
mov esi, 1
mov dword [ebp - 4], 0
mov dword [ebp - 0x2c], esi
push 0x100001
call fcn.005b89cc
push 0x100001
mov ebx, eax
push 0
push ebx
call fcn.005d05b0
mov eax, dword [ebp - 0x34]
add esp, 0x10
push 0
push 0x100000
push ebx
push dword [eax + 4]
call dword [sym.imp.WS2_32.dll_recv]
mov ecx, dword [ebp - 0x30]
mov dword [ecx], eax
test eax, eax
jle 0x41389b
mov eax, ebx
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
lea edx, [eax + 1]
nop word [eax + eax]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4137a0
sub eax, edx
lea ecx, [ebp - 0x28]
push eax
push ebx
call fcn.00403030
lea eax, [ebp - 0x28]
mov dword [ebp - 4], 1
push eax
mov ecx, edi
call fcn.00405d30
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x4137fd
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4137f3
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x413917
push edx
push ecx
call fcn.005b8996
add esp, 8
mov eax, dword [edi + 0x10]
test eax, eax
jle 0x41389b
lea ecx, [eax - 1]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
cmp eax, ecx
jb 0x413912
cmp dword [edi + 0x14], 0x10
mov eax, edi
jb 0x41382f
mov eax, dword [edi]
add eax, ecx
lea ecx, [ebp - 0x28]
push 1
push eax
call fcn.00403030
mov edx, dword [ebp - 0x18]
lea ecx, [ebp - 0x28]
or esi, 2
cmp dword [ebp - 0x14], 0x10
mov dword [ebp - 0x2c], esi
mov esi, dword [ebp - 0x28]
cmovae ecx, esi
push 1
push 0x62e674
call fcn.00408bb0
add esp, 8
test al, al
jne 0x4138d8
mov eax, dword [ebp - 0x14]
cmp eax, 0x10
jb 0x413898
lea ecx, [eax + 1]
mov eax, esi
cmp ecx, 0x1000
jb 0x41388e
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x413917
push ecx
push esi
call fcn.005b8996
add esp, 8
mov esi, dword [ebp - 0x2c]
push ebx
call fcn.005b89c7
add esp, 4
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x30]
cmp dword [eax], 0
jg 0x413746
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005b8427
mov esp, ebp
pop ebp
ret 8
push ebx
call fcn.005b89c7
mov eax, dword [ebp - 0x14]
add esp, 4
cmp eax, 0x10
jb 0x4138b8
lea ecx, [eax + 1]
mov eax, esi
cmp ecx, 0x1000
jb 0x413906
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x413917
push ecx
push esi
call fcn.005b8996
add esp, 8
jmp 0x4138b8
call fcn.00404b20
call fcn.005d36fe
int3