joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4554a0
Capabilities:
Enumerate pe sections
Inspect section memory permissions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
mov eax, dword [edx]
movzx edx, word [eax + 0x14]
lea eax, [ecx + edx + 0x18]
mov dword [ebp - 8], eax
mov dword [ebp - 4], 0
jmp 0x4554d6
mov ecx, dword [ebp - 4]
add ecx, 1
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 8]
add edx, 0x28
mov dword [ebp - 8], edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
movzx edx, word [ecx + 6]
cmp dword [ebp - 4], edx
jge 0x4555eb
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x24]
and ecx, 0x20000000
neg ecx
sbb ecx, ecx
neg ecx
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x24]
and eax, 0x40000000
neg eax
sbb eax, eax
neg eax
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x24]
and edx, 0x80000000
neg edx
sbb edx, edx
neg edx
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x24]
and ecx, 0x2000000
je 0x455552
push 0x4000
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x10]
push eax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 8]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x4554c4
mov eax, dword [ebp - 0x14]
shl eax, 4
mov ecx, dword [ebp - 0x1c]
lea edx, [eax + ecx*8 + 0x4f2af4]
mov eax, dword [ebp - 0x10]
mov ecx, dword [edx + eax*4]
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x24]
and eax, 0x4000000
je 0x455584
mov ecx, dword [ebp - 0x18]
or ecx, 0x200
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x10]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x4555c4
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x24]
and edx, 0x40
je 0x4555ab
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x20]
mov dword [ebp - 0x20], edx
jmp 0x4555c4
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x24]
and ecx, 0x80
je 0x4555c4
mov edx, dword [ebp + 8]
mov eax, dword [edx]
mov ecx, dword [eax + 0x24]
mov dword [ebp - 0x20], ecx
cmp dword [ebp - 0x20], 0
jbe 0x4555e6
lea edx, [ebp - 0xc]
push edx
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x10]
push edx
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
jmp 0x4554c4
mov esp, ebp
pop ebp
ret
Function at 0x456630
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push 0xffffffffffffffff
push 0x4cb3b3
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
mov eax, dword [0x4f4320]
xor eax, esp
push eax
lea eax, [esp + 0x10]
mov dword fs:[0], eax
mov esi, ecx
mov dword [esp + 0xc], esi
xor ebx, ebx
or eax, 0xffffffff
mov dword [esi + 8], eax
mov dword [esi + 4], eax
mov dword [esi + 0xc], ebx
mov dword [esi + 0x20], 0x4f8314
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x18], ebx
mov dword [esi + 0x1c], ebx
mov dword [esi + 0x24], ebx
mov dword [esi + 0x28], ebx
lea ecx, [esi + 0x34]
mov dword [esi], vtable.TiXmlDocument.0
mov dword [esp + 0x18], ebx
mov dword [ecx], 0x4f8314
mov dword [esi + 0x40], eax
mov dword [esi + 0x3c], eax
push ebx
push 0x4e23a0
mov byte [esp + 0x20], 1
mov dword [esi + 0x38], 4
mov byte [esi + 0x44], bl
mov byte [esi + 0x2c], bl
mov dword [esi + 0x30], ebx
call fcn.004598b0
mov dword [esi + 0x40], ebx
mov dword [esi + 0x3c], ebx
mov eax, esi
mov ecx, dword [esp + 0x10]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
add esp, 0x10
ret
Function at 0x4566e0
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4cb5d8
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4f4320]
xor eax, esp
push eax
lea eax, [esp + 0x18]
mov dword fs:[0], eax
mov ebx, ecx
mov ebp, dword [esp + 0x28]
xor edi, edi
cmp ebp, edi
jne 0x456722
push edi
push edi
push edi
push 2
call fcn.00457f00
xor al, al
jmp 0x4568bf
mov esi, dword [ebx + 0x18]
cmp esi, edi
je 0x456741
lea esp, [esp]
mov ecx, esi
mov eax, dword [ecx]
mov edx, dword [eax]
mov esi, dword [esi + 0x28]
push 1
call edx
cmp esi, edi
jne 0x456730
push 2
or eax, 0xffffffff
mov dword [ebx + 0x18], edi
mov dword [ebx + 0x1c], edi
push edi
push ebp
mov dword [ebx + 8], eax
mov dword [ebx + 4], eax
call fcn.00480c15
push ebp
call fcn.00480b20
push 0
push 0
push ebp
mov edi, eax
call fcn.00480c15
add esp, 0x1c
test edi, edi
jne 0x456785
push edi
push edi
push edi
push 0xd
mov ecx, ebx
call fcn.00457f00
xor al, al
jmp 0x4568bf
mov dword [esp + 0x14], 0x4f8314
push edi
lea ecx, [esp + 0x18]
mov dword [esp + 0x24], 0
call fcn.00459810
lea eax, [edi + 1]
push eax
call fcn.00459a00
push ebp
mov esi, eax
push 1
push edi
push esi
mov dword [esp + 0x3c], esi
mov byte [esi], 0
call fcn.0048096d
add esp, 0x14
cmp eax, 1
je 0x4567f5
push 0
push 0
push 0
push 2
mov ecx, ebx
call fcn.00457f00
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], 0xffffffff
cmp eax, 0x4f8314
je 0x4567ee
push eax
call fcn.00459a2b
add esp, 4
xor al, al
jmp 0x4568bf
mov ebp, dword [esp + 0x28]
mov byte [edi + ebp], 0
cmp byte [ebp], 0
mov eax, esi
je 0x456867
mov cl, byte [esi]
cmp cl, 0xa
jne 0x456825
mov ecx, esi
sub ecx, eax
add ecx, 1
push ecx
push eax
lea ecx, [esp + 0x1c]
call fcn.004599a0
add esi, 1
mov eax, esi
jmp 0x456862
cmp cl, 0xd
jne 0x45685f
mov ecx, esi
sub ecx, eax
test ecx, ecx
jle 0x45683d
push ecx
push eax
lea ecx, [esp + 0x1c]
call fcn.004599a0
push 1
lea edx, [esp + 0x2c]
push edx
lea ecx, [esp + 0x1c]
mov byte [esp + 0x30], 0xa
call fcn.004599a0
cmp byte [esi + 1], 0xa
jne 0x45681e
add esi, 2
mov eax, esi
jmp 0x456862
add esi, 1
cmp byte [esi], 0
jne 0x456805
sub esi, eax
je 0x456876
push esi
push eax
lea ecx, [esp + 0x1c]
call fcn.004599a0
push ebp
call fcn.00459a2b
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x18]
mov eax, dword [ebx]
mov eax, dword [eax + 8]
add esp, 4
push ecx
push 0
add edx, 8
push edx
mov ecx, ebx
call eax
cmp byte [ebx + 0x2c], 0
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], 0xffffffff
jne 0x4567de
cmp eax, 0x4f8314
je 0x4568bd
push eax
call fcn.00459a2b
add esp, 4
mov al, 1
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 8
Function at 0x4626bf
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push ebp
push esi
push edi
xor edi, edi
xor ebx, ebx
cmp dword [esp + 0x14], edi
mov ebp, ecx
je 0x462702
call fcn.00464084
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x18]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x462702
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
je 0x46271d
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
push ebx
mov ecx, ebp
call fcn.00462279
test ebx, ebx
mov esi, eax
je 0x46271b
test edi, edi
je 0x46271b
push edi
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
ret 4

Function at 0x4645ea
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x230
mov eax, dword [0x4f4320]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 8], 0x800
push ebx
push esi
mov esi, ecx
mov ebx, edx
lea eax, [ebp - 0xc]
jne 0x464627
push 0x4d6820
push 4
push eax
call fcn.00482af2
push eax
call fcn.00459caa
add esp, 0x10
jmp 0x464639
push 4
push eax
push 3
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x4646a4
push edi
call fcn.00480587
mov edi, dword [eax]
call fcn.00480587
and dword [eax], 0
lea eax, [ebp - 0xc]
push eax
push ebx
push esi
push 0x111
mov esi, 0x112
lea eax, [ebp - 0x230]
push esi
push eax
call fcn.00479c3a
add esp, 0x18
mov ebx, eax
call fcn.00480587
cmp dword [eax], 0
je 0x464684
call fcn.00480587
push dword [eax]
call fcn.0045d219
pop ecx
jmp 0x46468b
call fcn.00480587
mov dword [eax], edi
cmp ebx, 0xffffffff
pop edi
je 0x4646a4
cmp ebx, esi
jae 0x4646a4
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
jmp 0x4646a6
xor eax, eax
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.0047a020
leave
ret
Function at 0x4663b1
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
xor ebx, ebx
cmp dword [ebp + 0xc], ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 4], ebx
je 0x4663f7
call fcn.00464084
mov esi, dword [eax + 0xc]
push 0xf0
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x4663f7
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
mov dword [ebp - 4], eax
je 0x46643a
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
test ebx, ebx
mov esi, dword [ebp + 8]
mov dword [ebp + 0xc], 1
je 0x466423
push dword [ebp + 0x10]
mov eax, dword [edi]
push ebx
push esi
mov ecx, edi
call dword [eax + 0x20]
cmp dword [ebp - 4], 0
mov dword [ebp + 0xc], eax
je 0x466423
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FreeResource]
cmp dword [esi + 0x4c], 0
je 0x466437
mov ecx, dword [esi + 0x4c]
push dword [ebp + 0x10]
mov eax, dword [ecx]
call dword [eax + 0xa0]
mov eax, dword [ebp + 0xc]
pop edi
pop esi
pop ebx
leave
ret 0xc

Function at 0x467e51
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x467e7f
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x467e9d
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.00467dbb
jmp 0x467e9d
mov eax, dword [esi + 0x14]
test eax, eax
je 0x467e9d
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
push eax
mov ecx, esi
call fcn.00467dbb
test edi, edi
mov eax, edi
jne 0x467e87
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
mov ecx, dword [0x4f9d3c]
test ecx, ecx
je 0x467f60
jmp 0x467e50
ret 8

Function at 0x47a020
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x4f4320]
jne 0x47a02a
repz ret
jmp fcn.00485f2c
Function at 0x4806d1
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov ecx, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
xor edi, edi
cmp dword [ebp + 0x10], edi
mov dword [ebp - 8], ecx
mov dword [ebp - 4], ebx
je 0x48070e
cmp dword [ebp + 0x14], edi
je 0x48070e
cmp ecx, edi
jne 0x480715
call fcn.00480587
push edi
push edi
push edi
push edi
mov dword [eax], 0x16
push edi
call fcn.0047a570
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
mov esi, dword [ebp + 0x18]
cmp esi, edi
je 0x480729
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
jbe 0x48074a
cmp ebx, 0xffffffff
je 0x480739
push ebx
push edi
push ecx
call fcn.00479a10
add esp, 0xc
cmp esi, edi
je 0x4806f6
or eax, 0xffffffff
xor edx, edx
div dword [ebp + 0x10]
cmp dword [ebp + 0x14], eax
ja 0x4806f6
mov edi, dword [ebp + 0x10]
imul edi, dword [ebp + 0x14]
test word [esi + 0xc], 0x10c
mov dword [ebp - 0x10], edi
mov ebx, edi
je 0x480766
mov eax, dword [esi + 0x18]
mov dword [ebp - 0xc], eax
jmp 0x48076d
mov dword [ebp - 0xc], 0x1000
test edi, edi
je 0x48085e
test word [esi + 0xc], 0x10c
je 0x4807c1
mov eax, dword [esi + 4]
test eax, eax
je 0x4807c1
jl 0x4808bf
cmp ebx, eax
mov edi, ebx
jb 0x480792
mov edi, eax
cmp edi, dword [ebp - 4]
ja 0x480866
push edi
push dword [esi]
push dword [ebp - 4]
push dword [ebp - 8]
call fcn.0047a31b
sub dword [esi + 4], edi
add dword [esi], edi
add dword [ebp - 8], edi
sub ebx, edi
add esp, 0x10
sub dword [ebp - 4], edi
mov edi, dword [ebp - 0x10]
jmp 0x480856
cmp ebx, dword [ebp - 0xc]
jb 0x48082e
cmp dword [ebp - 0xc], 0
je 0x4807eb
mov ecx, SysReAllocString
xor edx, edx
cmp ebx, ecx
jbe 0x4807e0
mov eax, ecx
div dword [ebp - 0xc]
mov eax, ecx
jmp 0x4807e7
mov eax, ebx
div dword [ebp - 0xc]
mov eax, ebx
sub eax, edx
jmp 0x4807f6
mov eax, SysReAllocString
cmp ebx, eax
ja 0x4807f6
mov eax, ebx
cmp eax, dword [ebp - 4]
ja 0x480892
push eax
push dword [ebp - 8]
push esi
call fcn.0048eb02
pop ecx
push eax
call fcn.00490da5
add esp, 0xc
test eax, eax
je 0x4808d1
cmp eax, 0xffffffff
je 0x4808bf
add dword [ebp - 8], eax
sub ebx, eax
sub dword [ebp - 4], eax
jmp 0x480856
push esi
call fcn.004906c4
cmp eax, 0xffffffff
pop ecx
je 0x4808c3
cmp dword [ebp - 4], 0
je 0x480892
mov ecx, dword [ebp - 8]
inc dword [ebp - 8]
mov byte [ecx], al
mov eax, dword [esi + 0x18]
dec ebx
dec dword [ebp - 4]
mov dword [ebp - 0xc], eax
test ebx, ebx
jne 0x480775
mov eax, dword [ebp + 0x14]
jmp 0x480710
xor esi, esi
cmp dword [ebp + 0xc], 0xffffffff
je 0x48087d
push dword [ebp + 0xc]
push esi
push dword [ebp + 8]
call fcn.00479a10
add esp, 0xc
call fcn.00480587
push esi
push esi
push esi
push esi
mov dword [eax], 0x22
push esi
jmp 0x480706
cmp dword [ebp + 0xc], 0xffffffff
je 0x4808a8
push dword [ebp + 0xc]
push 0
push dword [ebp + 8]
call fcn.00479a10
add esp, 0xc
call fcn.00480587
mov dword [eax], 0x22
xor eax, eax
push eax
push eax
push eax
push eax
push eax
jmp 0x480706
or dword [esi + 0xc], 0x20
mov eax, edi
sub eax, ebx
xor edx, edx
div dword [ebp + 0x10]
jmp 0x480710
or dword [esi + 0xc], 0x10
jmp 0x4808c3
Function at 0x483377
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push esi
push edi
xor esi, esi
xor edi, edi
cmp ebx, dword [edi*8 + 0x4f4530]
je 0x483392
inc edi
cmp edi, 0x17
jb 0x483383
cmp edi, 0x17
jae 0x483512
push ebp
push 3
call fcn.00492ce2
cmp eax, 1
pop ecx
je 0x4834de
push 3
call fcn.00492ce2
test eax, eax
pop ecx
jne 0x4833c6
cmp dword [0x4f4318], 1
je 0x4834de
cmp ebx, 0xfc
je 0x483511
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x4fa2b8
push ebp
call fcn.004860a0
add esp, 0xc
test eax, eax
je 0x4833fc
push esi
push esi
push esi
push esi
push esi
call fcn.0047a474
add esp, 0x14
push 0x104
mov esi, 0x4fa2d1
push esi
push 0
mov byte [0x4fa3d5], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x483440
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.004860a0
add esp, 0xc
test eax, eax
je 0x483440
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.0047a474
add esp, 0x14
push esi
call fcn.0047a290
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x483485
push esi
call fcn.0047a290
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x4fa5cc
push 0x4d91e4
sub ecx, eax
push ecx
push eax
call fcn.0048c347
add esp, 0x14
test eax, eax
je 0x483485
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.0047a474
add esp, 0x14
jmp 0x483487
xor esi, esi
push 0x4d91e0
push ebx
push ebp
call fcn.0048c2d6
add esp, 0xc
test eax, eax
je 0x4834a7
push esi
push esi
push esi
push esi
push esi
call fcn.0047a474
add esp, 0x14
push dword [edi*8 + 0x4f4534]
push ebx
push ebp
call fcn.0048c2d6
add esp, 0xc
test eax, eax
je 0x4834c9
push esi
push esi
push esi
push esi
push esi
call fcn.0047a474
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.00492b25
add esp, 0xc
jmp 0x483511
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x483511
cmp ebp, 0xffffffff
je 0x483511
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x4f4534]
push dword [esi]
call fcn.0047a290
pop ecx
push eax
push dword [esi]
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x492b25
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.00483f27
xor ebx, ebx
cmp dword [0x4fadc4], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x492bfb
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x492cdb
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
je 0x492cdb
push eax
call fcn.00483eb9
mov dword [esp], 0x4da60c
push edi
mov dword [0x4fadc4], eax
call esi
push eax
call fcn.00483eb9
mov dword [esp], 0x4da5f8
push edi
mov dword [0x4fadc8], eax
call esi
push eax
call fcn.00483eb9
mov dword [0x4fadcc], eax
lea eax, [ebp - 0xc]
push eax
call fcn.0048287f
test eax, eax
pop ecx
pop ecx
je 0x492bc9
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0047a474
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x492bfb
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.00483eb9
cmp eax, ebx
pop ecx
mov dword [0x4fadd4], eax
je 0x492bfb
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.00483eb9
pop ecx
mov dword [0x4fadd0], eax
mov eax, dword [0x4fadd0]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x492c80
cmp dword [0x4fadd4], ecx
je 0x492c80
push eax
call fcn.00483f30
push dword [0x4fadd4]
mov esi, eax
call fcn.00483f30
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x492c80
cmp edi, ebx
je 0x492c80
call esi
cmp eax, ebx
je 0x492c4d
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x492c4d
test byte [ebp - 0x18], 1
jne 0x492c80
lea eax, [ebp - 0x10]
push eax
call fcn.004828b6
test eax, eax
pop ecx
je 0x492c68
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0047a474
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x492c77
or dword [ebp + 0x10], 0x200000
jmp 0x492cbb
or dword [ebp + 0x10], 0x40000
jmp 0x492cbb
mov eax, dword [0x4fadc8]
cmp eax, dword [ebp - 8]
je 0x492cbb
push eax
call fcn.00483f30
cmp eax, ebx
pop ecx
je 0x492cbb
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x492cbb
mov eax, dword [0x4fadcc]
cmp eax, dword [ebp - 8]
je 0x492cbb
push eax
call fcn.00483f30
cmp eax, ebx
pop ecx
je 0x492cbb
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x4fadc4]
call fcn.00483f30
cmp eax, ebx
pop ecx
je 0x492cdb
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x492cdd
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x499a40
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x194
mov eax, dword [0x4f4320]
xor eax, esp
mov dword [esp + 0x190], eax
lea eax, [esp]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x499a90
mov ax, word [esp]
cmp al, 2
jne 0x499a8a
cmp ah, al
jne 0x499a8a
xor eax, eax
mov ecx, dword [esp + 0x190]
xor ecx, esp
call fcn.0047a020
add esp, 0x194
ret
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [esp + 0x190]
xor ecx, esp
mov eax, 2
call fcn.0047a020
add esp, 0x194
ret

Function at 0x49ada0
Capabilities:
Read file on windows

Disassembly:
push edi
mov edi, eax
mov eax, dword [esi]
cmp dword [eax + 4], 2
jne 0x49adc2
mov ecx, dword [esi + 0xc]
test ecx, ecx
jne 0x49adb6
xor eax, eax
pop edi
ret
mov eax, dword [eax + 8]
push eax
push edi
push 1
push ebx
call ecx
jmp 0x49adf2
cmp dword [esi + 8], 0
jne 0x49ade5
mov ecx, dword [eax + 8]
push 0x4d4a68
push ecx
call fcn.0048068f
add esp, 8
test eax, eax
mov dword [esi + 8], eax
jne 0x49ade5
or eax, 0xffffffff
pop edi
ret
mov edx, dword [esi + 8]
push edx
push edi
push 1
push ebx
call fcn.0048096d
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x49ae14
mov eax, dword [esi + 8]
test eax, eax
je 0x49ae0e
push eax
call fcn.0047f801
add esp, 4
mov dword [esi + 8], edi
mov eax, dword [esi]
mov ecx, dword [eax]
mov dword [esi], ecx
mov eax, edi
pop edi
ret
Function at 0x4a5d80
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
push 0
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x4a5db2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
sub eax, 0x2733
neg eax
sbb eax, eax
and eax, 0xffffffe7
add eax, 0x51
ret
mov ecx, dword [esp + 0x10]
mov dword [ecx], eax
xor eax, eax
ret

Function at 0x4a5f00
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esi + 0x164]
test ecx, ecx
je 0x4a5f1b
mov edx, dword [esi + 0xf4]
push edx
push edi
push ebx
push eax
push esi
call ecx
add esp, 0x14
ret
test eax, eax
jl 0x4a5f4f
cmp eax, 2
jg 0x4a5f4f
mov ecx, dword [esi + 0xf0]
push ecx
push 1
lea edx, [eax + eax*2 + 0x4dc818]
push 2
push edx
call fcn.0047f9dc
mov eax, dword [esi + 0xf0]
push eax
push 1
push edi
push ebx
call fcn.0047f9dc
add esp, 0x20
xor eax, eax
ret

Function at 0x4a6260
Capabilities:
Send data
Send data on socket

Disassembly:
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 8]
push ebx
push esi
mov esi, dword [esp + 0xc]
mov eax, dword [esi + eax*4 + 0x130]
push edi
push 0
push ecx
push edx
push eax
call dword [sym.imp.WS2_32.dll_send]
mov ebx, dword [esp + 0x20]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebx], 0
jne 0x4a62dd
push ebp
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, eax
cmp ebp, 0x2733
jne 0x4a62b4
pop ebp
pop edi
pop esi
mov dword [ebx], 0x51
xor eax, eax
pop ebx
ret
push ebp
push esi
call fcn.004aa5c0
push eax
mov eax, dword [esi]
push str.Send_failure:__s
push eax
call fcn.004a60e0
mov ecx, dword [esi]
add esp, 0x14
mov dword [ecx + 0x856c], ebp
mov dword [ebx], 0x37
mov eax, edi
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x4a6aa0
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x10c
mov eax, dword [0x4f4320]
xor eax, esp
mov dword [esp + 0x108], eax
push ebx
push ebp
mov ebp, dword [esp + 0x118]
cmp dword [ebp + 0x19c], 0
push esi
push edi
mov edi, dword [ebp]
mov dword [esp + 0x14], edi
jne 0x4a6bdb
mov esi, dword [esp + 0x124]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x1c]
push ecx
mov ebx, 0x80
push esi
mov dword [esp + 0x1c], ebx
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x4a6b1c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push ebp
call fcn.004aa5c0
push eax
push esi
push str.getpeername___failed_with_errno__d:__s
push edi
call fcn.004a60e0
add esp, 0x18
jmp 0x4a6be4
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x9c]
push eax
push esi
mov dword [esp + 0x1c], ebx
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x4a6b5c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
push esi
push ebp
call fcn.004aa5c0
push eax
push esi
push str.getsockname___failed_with_errno__d:__s
push edi
call fcn.004a60e0
add esp, 0x18
jmp 0x4a6be4
lea ebx, [ebp + 0xcc]
lea edi, [ebp + 0x9e]
lea esi, [esp + 0x18]
call fcn.004a6a60
test eax, eax
jne 0x4a6b9a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebp
call fcn.004aa5c0
mov ecx, dword [esp + 0x1c]
push eax
push esi
push str.ssrem_inet_ntop___failed_with_errno__d:__s
push ecx
call fcn.004a60e0
add esp, 0x18
jmp 0x4a6be4
lea ebx, [ebp + 0x100]
lea edi, [ebp + 0xd0]
lea esi, [esp + 0x98]
call fcn.004a6a60
test eax, eax
jne 0x4a6bdb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push ebp
call fcn.004aa5c0
mov edx, dword [esp + 0x1c]
push eax
push esi
push str.ssloc_inet_ntop___failed_with_errno__d:__s
push edx
call fcn.004a60e0
add esp, 0x18
jmp 0x4a6be4
push ebp
call fcn.004a6a00
add esp, 4
mov ecx, dword [esp + 0x118]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0047a020
add esp, 0x10c
ret

Function at 0x4a6c00
Capabilities:
Set socket configuration

Disassembly:
push ecx
push esi
mov esi, dword [edi]
mov eax, dword [esi + 0x314]
push 4
lea ecx, [esp + 8]
push ecx
push 1
push 6
push edx
mov dword [esp + 0x18], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x4a6c43
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push edi
call fcn.004aa5c0
push eax
push str.Could_not_set_TCP_NODELAY:__s_n
push esi
call fcn.004a6050
add esp, 0x14
pop esi
pop ecx
ret
push str.TCP_NODELAY_set_n
push esi
call fcn.004a6050
add esp, 8
pop esi
pop ecx
ret

Function at 0x4a6c60
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0xc
push esi
mov esi, dword [esp + 0x14]
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 8]
push ecx
push 0x1001
push 0xffff
push esi
mov dword [esp + 0x1c], 0x4020
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], 4
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x4a6ca9
mov edx, dword [esp + 4]
cmp edx, dword [esp + 8]
jg 0x4a6cc1
push 4
lea eax, [esp + 0xc]
push eax
push 0x1001
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
pop esi
add esp, 0xc
ret