joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4090c0
Capabilities:
Extract resource via kernel32 functions
Write file on windows

Disassembly:
push ebx
push ebp
push esi
push edi
push 0x4456c4
push 0x81
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
push esi
push 0
mov edi, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push edi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_LockResource]
xor edi, edi
push edi
push 0x90
push 2
push edi
mov ebp, eax
mov eax, dword [esp + 0x24]
mov eax, dword [eax]
push 3
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x409132
push edi
lea ecx, [esp + 0x18]
push ecx
push ebx
push ebp
push esi
mov dword [esp + 0x28], edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, eax
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x409650
Capabilities:
Create directory

Disassembly:
sub esp, 0x20
push ebp
mov ebp, dword [esp + 0x28]
cmp dword [ebp + 0x18], 0x10
push esi
jb 0x40966b
mov eax, dword [ebp + 4]
lea esi, [ebp + 4]
mov dword [esp + 8], esi
jmp 0x409674
lea eax, [ebp + 4]
mov dword [esp + 8], eax
mov esi, eax
push 0
push eax
call fcn.004278d3
add esp, 8
test eax, eax
je 0x409720
push ebx
push edi
push ebp
mov ecx, 1
lea ebx, [esp + 0x38]
mov byte [esp + 0x38], 0x5c
call fcn.00409850
mov edi, eax
cmp edi, 0xffffffff
je 0x4096fd
push edi
xor ecx, ecx
lea esi, [esp + 0x18]
mov edx, ebp
call fcn.00408eb0
mov esi, 0x10
cmp dword [eax + 0x18], esi
jb 0x4096c1
mov eax, dword [eax + 4]
jmp 0x4096c4
add eax, 4
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
cmp dword [esp + 0x2c], esi
jb 0x4096e0
mov eax, dword [esp + 0x18]
push eax
call fcn.00409bed
add esp, 4
lea ecx, [edi + 1]
push ebp
lea ebx, [esp + 0x38]
mov byte [esp + 0x38], 0x5c
call fcn.00409850
mov edi, eax
cmp edi, 0xffffffff
jne 0x4096a4
mov esi, dword [esp + 0x10]
cmp dword [ebp + 0x18], 0x10
pop edi
pop ebx
jb 0x409709
mov eax, dword [esi]
jmp 0x40970b
mov eax, esi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x409720
pop esi
xor al, al
pop ebp
add esp, 0x20
ret
pop esi
mov al, 1
pop ebp
add esp, 0x20
ret
Function at 0x40c1fc
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x11c
mov eax, dword [0x44f6d0]
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 - 0x11c]
jne 0x40c23c
push 0x43fc60
push 4
push eax
call fcn.00427c6a
push eax
call fcn.00402320
add esp, 0x10
jmp 0x40c24e
push 4
push eax
push 3
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
je 0x40c2bc
push edi
call fcn.00428b77
mov edi, dword [eax]
call fcn.00428b77
and dword [eax], 0
lea eax, [ebp - 0x11c]
push eax
push ebx
push esi
push 0x111
mov esi, 0x112
lea eax, [ebp - 0x118]
push esi
push eax
call fcn.0042630b
add esp, 0x18
mov ebx, eax
call fcn.00428b77
cmp dword [eax], 0
je 0x40c29c
call fcn.00428b77
push dword [eax]
call fcn.0040a2c8
pop ecx
jmp 0x40c2a3
call fcn.00428b77
mov dword [eax], edi
cmp ebx, 0xffffffff
pop edi
je 0x40c2bc
cmp ebx, esi
jae 0x40c2bc
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
jmp 0x40c2be
xor eax, eax
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.0042632a
leave
ret
Function at 0x4100a5
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
cmp dword [esi + 0x50], 0
jne 0x4100de
push dword [esi + 0x20]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.00409c73
push eax
push dword [esi + 0x20]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.004091e0
pop esi
ret 4
mov ecx, dword [esi + 0x50]
mov eax, dword [ecx]
pop esi
jmp dword [eax + 0x8c]

Function at 0x41171b
Capabilities:
Get graphical window text

Disassembly:
push esi
push edi
mov edi, dword [esp + 0x10]
mov esi, ecx
push 0x444cb8
mov ecx, edi
call fcn.004024c0
cmp dword [esi + 0x4c], 0
push dword [esp + 0xc]
jne 0x41176e
push dword [esi + 0x20]
call dword [sym.imp.USER32.dll_GetDlgItem]
mov esi, eax
test esi, esi
je 0x411781
push esi
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
push eax
mov ecx, edi
call fcn.00409c73
push eax
push esi
call dword [sym.imp.USER32.dll_GetWindowTextA]
push 0xffffffffffffffff
mov ecx, edi
call fcn.004091e0
jmp 0x411781
mov ecx, esi
call fcn.00411d04
test eax, eax
je 0x411781
push edi
mov ecx, eax
call fcn.004100a5
mov eax, dword [edi]
mov eax, dword [eax - 0xc]
pop edi
pop esi
ret 8

Function at 0x411c62
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 0x411ca5
call fcn.00416bd0
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x18]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x411ca5
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
je 0x411cc0
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
push ebx
mov ecx, ebp
call fcn.00411819
test ebx, ebx
mov esi, eax
je 0x411cbe
test edi, edi
je 0x411cbe
push edi
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
ret 4

Function at 0x414604
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 0x41464a
call fcn.00416bd0
mov esi, dword [eax + 0xc]
push 0xf0
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x41464a
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
mov dword [ebp - 4], eax
je 0x41468d
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 0x414676
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 0x414676
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FreeResource]
cmp dword [esi + 0x4c], 0
je 0x41468a
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 0x4158ae
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push 0x24
mov eax, 0x43cbdf
call fcn.0042880f
mov esi, ecx
mov dword [ebp - 0x20], esi
mov eax, dword [esi + 0x60]
mov dword [ebp - 0x1c], eax
mov eax, dword [esi + 0x5c]
mov dword [ebp - 0x18], eax
call fcn.00416bd0
mov edi, dword [eax + 0xc]
xor ebx, ebx
cmp dword [esi + 0x58], ebx
je 0x4158f9
call fcn.00416bd0
mov edi, dword [eax + 0xc]
push 5
push dword [esi + 0x58]
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], ebx
je 0x41590a
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], ebx
jne 0x415917
or eax, 0xffffffff
jmp 0x415a73
mov ecx, esi
call fcn.00415400
mov dword [ebp - 0x14], eax
call fcn.0040f0dd
and dword [ebp - 0x28], ebx
cmp dword [ebp - 0x14], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x24], ebx
je 0x415995
call dword [sym.imp.USER32.dll_GetDesktopWindow]
cmp dword [ebp - 0x14], eax
je 0x415995
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_IsWindowEnabled]
test eax, eax
je 0x415995
push 0
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_EnableWindow]
mov dword [ebp - 0x2c], 1
call fcn.0040b87b
mov ebx, eax
test ebx, ebx
mov dword [ebp - 0x24], ebx
je 0x415995
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x120]
test eax, eax
je 0x415995
mov ecx, ebx
call fcn.00411e92
test eax, eax
je 0x415995
push 0
mov ecx, ebx
call fcn.00411ead
mov dword [ebp - 0x28], 1
and dword [ebp - 4], 0
push esi
call fcn.00410ad5
push dword [ebp - 0x14]
call fcn.0040f035
push edi
push eax
push dword [ebp - 0x1c]
mov ecx, esi
call fcn.004156b6
xor edi, edi
cmp eax, edi
je 0x4159f2
test byte [esi + 0x3c], 0x10
je 0x4159dc
push 4
pop edi
mov ecx, esi
call fcn.00411da3
test ax, 0x100
je 0x4159d2
push 5
pop edi
push edi
mov ecx, esi
call fcn.0040ebcb
xor edi, edi
cmp dword [esi + 0x20], edi
je 0x4159f2
push 0x97
push edi
push edi
push edi
push edi
push edi
mov ecx, esi
call fcn.0041207c
or dword [ebp - 4], 0xffffffff
jmp 0x415a1d
cmp dword [ebp - 0x28], edi
je 0x415a2b
push 1
mov ecx, ebx
call fcn.00411ead
cmp dword [ebp - 0x2c], edi
je 0x415a3b
push 1
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_EnableWindow]
cmp dword [ebp - 0x14], edi
je 0x415a54
call dword [sym.imp.USER32.dll_GetActiveWindow]
cmp eax, dword [esi + 0x20]
jne 0x415a54
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_SetActiveWindow]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x60]
mov ecx, esi
call fcn.0041543a
cmp dword [esi + 0x58], edi
je 0x415a70
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, dword [esi + 0x44]
call fcn.004288b4
ret
Function at 0x417304
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 0x417332
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x417350
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.0041726e
jmp 0x417350
mov eax, dword [esi + 0x14]
test eax, eax
je 0x417350
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
push eax
mov ecx, esi
call fcn.0041726e
test edi, edi
mov eax, edi
jne 0x41733a
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
mov ecx, dword [0x45274c]
test ecx, ecx
je 0x417413
jmp 0x417303
ret 8

Function at 0x42632a
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x44f6d0]
jne 0x426334
repz ret
jmp fcn.0042d12f

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

Disassembly:
push esi
xor esi, esi
cmp dword [esp + 8], esi
jne 0x427900
call fcn.00428b8a
mov dword [eax], esi
call fcn.00428b77
push esi
push esi
push esi
push esi
push esi
mov dword [eax], 0x16
call fcn.0042643f
add esp, 0x14
push 0x16
pop eax
pop esi
ret
test dword [esp + 0xc], 0xfffffff9
jne 0x4278dc
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x42792f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00428b9d
pop ecx
call fcn.00428b77
mov eax, dword [eax]
pop esi
ret
test al, 0x10
jne 0x427956
test al, 1
je 0x427956
test byte [esp + 0xc], 2
je 0x427956
call fcn.00428b8a
mov dword [eax], 5
call fcn.00428b77
mov dword [eax], 0xd
jmp 0x427926
xor eax, eax
pop esi
ret
Function at 0x42f766
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 + 0x44feb8]
je 0x42f781
inc edi
cmp edi, 0x17
jb 0x42f772
cmp edi, 0x17
jae 0x42f901
push ebp
push 3
call fcn.00436d20
cmp eax, 1
pop ecx
je 0x42f8cd
push 3
call fcn.00436d20
test eax, eax
pop ecx
jne 0x42f7b5
cmp dword [0x44f6c0], 1
je 0x42f8cd
cmp ebx, 0xfc
je 0x42f900
push 0x442de8
mov ebx, 0x314
push ebx
mov ebp, 0x452e48
push ebp
call fcn.00427c6a
add esp, 0xc
test eax, eax
je 0x42f7eb
push esi
push esi
push esi
push esi
push esi
call fcn.00426343
add esp, 0x14
push 0x104
mov esi, 0x452e61
push esi
push 0
mov byte [0x452f65], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x42f82f
push 0x442dd0
push 0x2fb
push esi
call fcn.00427c6a
add esp, 0xc
test eax, eax
je 0x42f82f
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.00426343
add esp, 0x14
push esi
call fcn.00428340
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x42f874
push esi
call fcn.00428340
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x45315c
push 0x442dcc
sub ecx, eax
push ecx
push eax
call fcn.00429874
add esp, 0x14
test eax, eax
je 0x42f874
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.00426343
add esp, 0x14
jmp 0x42f876
xor esi, esi
push 0x442dc8
push ebx
push ebp
call fcn.004297b3
add esp, 0xc
test eax, eax
je 0x42f896
push esi
push esi
push esi
push esi
push esi
call fcn.00426343
add esp, 0x14
push dword [edi*8 + 0x44febc]
push ebx
push ebp
call fcn.004297b3
add esp, 0xc
test eax, eax
je 0x42f8b8
push esi
push esi
push esi
push esi
push esi
call fcn.00426343
add esp, 0x14
push 0x12010
push 0x442da0
push ebp
call fcn.00436b63
add esp, 0xc
jmp 0x42f900
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x42f900
cmp ebp, 0xffffffff
je 0x42f900
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x44febc]
push dword [esi]
call fcn.00428340
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 0x436b63
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.0042c036
xor ebx, ebx
cmp dword [0x4534f0], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x436c39
push 0x443fa0
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x436d19
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x443f94
push edi
call esi
cmp eax, ebx
je 0x436d19
push eax
call fcn.0042bfc8
mov dword [esp], 0x443f84
push edi
mov dword [0x4534f0], eax
call esi
push eax
call fcn.0042bfc8
mov dword [esp], 0x443f70
push edi
mov dword [0x4534f4], eax
call esi
push eax
call fcn.0042bfc8
mov dword [0x4534f8], eax
lea eax, [ebp - 0xc]
push eax
call fcn.004294b9
test eax, eax
pop ecx
pop ecx
je 0x436c07
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00426343
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x436c39
push 0x443f54
push edi
call esi
push eax
call fcn.0042bfc8
cmp eax, ebx
pop ecx
mov dword [0x453500], eax
je 0x436c39
push 0x443f3c
push edi
call esi
push eax
call fcn.0042bfc8
pop ecx
mov dword [0x4534fc], eax
mov eax, dword [0x4534fc]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x436cbe
cmp dword [0x453500], ecx
je 0x436cbe
push eax
call fcn.0042c03f
push dword [0x453500]
mov esi, eax
call fcn.0042c03f
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x436cbe
cmp edi, ebx
je 0x436cbe
call esi
cmp eax, ebx
je 0x436c8b
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x436c8b
test byte [ebp - 0x18], 1
jne 0x436cbe
lea eax, [ebp - 0x10]
push eax
call fcn.004294f0
test eax, eax
pop ecx
je 0x436ca6
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00426343
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x436cb5
or dword [ebp + 0x10], 0x200000
jmp 0x436cf9
or dword [ebp + 0x10], 0x40000
jmp 0x436cf9
mov eax, dword [0x4534f4]
cmp eax, dword [ebp - 8]
je 0x436cf9
push eax
call fcn.0042c03f
cmp eax, ebx
pop ecx
je 0x436cf9
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x436cf9
mov eax, dword [0x4534f8]
cmp eax, dword [ebp - 8]
je 0x436cf9
push eax
call fcn.0042c03f
cmp eax, ebx
pop ecx
je 0x436cf9
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x4534f0]
call fcn.0042c03f
cmp eax, ebx
pop ecx
je 0x436d19
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x436d1b
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x43c23f
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x98
mov eax, dword [0x44f6d0]
xor eax, ebp
mov dword [ebp + 0x74], eax
push esi
mov esi, ecx
call fcn.0043c1d4
mov eax, 0x400000
push 0x94
mov dword [esi + 8], eax
mov dword [esi + 4], eax
lea eax, [ebp - 0x20]
push 0
push eax
mov dword [esi], 0x3c
mov byte [esi + 0xc], 0
call fcn.00428c20
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x20], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x10], 2
jne 0x43c28e
cmp dword [ebp - 0x1c], 5
jb 0x43c2a6
jmp 0x43c2a2
cmp dword [ebp - 0x10], 1
jne 0x43c2a6
cmp dword [ebp - 0x1c], 4
ja 0x43c2a2
jne 0x43c2a6
cmp dword [ebp - 0x18], 0
jbe 0x43c2a6
mov byte [esi + 0xc], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x10], 0x800
mov dword [esi + 0x14], 0x444870
call fcn.0043c0c5
test eax, eax
jge 0x43c2c7
mov byte [0x45358d], 1
mov ecx, dword [ebp + 0x74]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.0042632a
add ebp, 0x78
leave
ret
Function at 0x402de0
Capabilities:
Create tcp socket
Create udp socket
Get socket status
Set socket configuration
Start tcp server

Disassembly:
sub esp, 0x134
mov ecx, dword [esp + 0x138]
xor eax, eax
mov dword [esp + 8], eax
push ebx
push ebp
mov dword [esp + 0x14], eax
push esi
push edi
mov dword [esp + 0x20], eax
push ecx
mov dword [esp + 0x28], eax
call dword [sym.imp.WSOCK32.dll_htons]
push 0x7f000001
mov word [esp + 0x1e], ax
mov word [esp + 0x1c], 2
call dword [sym.imp.WSOCK32.dll_htonl]
push 0
push 1
push 2
mov dword [esp + 0x28], eax
call dword [sym.imp.WSOCK32.dll_socket]
mov edi, dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov esi, eax
call edi
cmp esi, 0xffffffff
mov ebx, eax
jne 0x402e66
push 0
push 1
mov edx, dword [esp + 0x158]
push 0x8400
push edx
call dword [sym.imp.USER32.dll_PostMessageA]
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x134
ret
lea eax, [esp + 0x13]
push 4
push eax
push 4
push 0xffff
push esi
mov byte [esp + 0x27], 1
call dword [sym.imp.WSOCK32.dll_setsockopt]
lea ecx, [esp + 0x18]
push 0x10
push ecx
push esi
call dword [sym.imp.WSOCK32.dll_bind]
mov ebp, eax
call edi
test ebp, ebp
mov ebx, eax
je 0x402e9e
push 0
push 2
jmp 0x402e46
push 1
push esi
call dword [sym.imp.WSOCK32.dll_listen]
mov ebp, eax
call edi
test ebp, ebp
mov ebx, eax
push 0
je 0x402ed5
mov eax, dword [esp + 0x154]
push 1
push 0x8400
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x134
ret
mov ecx, dword [esp + 0x154]
push 0
push 0x8400
push ecx
call dword [sym.imp.USER32.dll_PostMessageA]
lea edx, [esp + 0x28]
lea eax, [esp + 0x40]
push edx
push 0
push 0
lea ecx, [esi + 1]
push eax
push ecx
mov dword [esp + 0x58], esi
mov dword [esp + 0x54], 1
mov dword [esp + 0x3c], 0xa
mov dword [esp + 0x40], 0
call dword [sym.imp.WSOCK32.dll_select]
mov ebx, eax
call edi
cmp ebx, 0xffffffff
je 0x402f98
test ebx, ebx
jne 0x402f3b
pop edi
pop esi
pop ebp
mov eax, 0x15f90
pop ebx
add esp, 0x134
ret
lea edx, [esp + 0x40]
push edx
push esi
call sub.WSOCK32.dll___WSAFDIsSet
test eax, eax
jne 0x402f5a
pop edi
pop esi
pop ebp
mov eax, 0x15f90
pop ebx
add esp, 0x134
ret
lea eax, [esp + 0x14]
lea ecx, [esp + 0x30]
push eax
push ecx
push esi
mov dword [esp + 0x20], 0x10
call dword [sym.imp.WSOCK32.dll_accept]
mov ebx, dword [esp + 0x14c]
mov dword [ebx], eax
call edi
cmp dword [ebx], 0xffffffff
je 0x402f98
push esi
call dword [sym.imp.WSOCK32.dll_closesocket]
mov esi, eax
call edi
mov ecx, eax
mov eax, esi
neg eax
sbb eax, eax
and eax, ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x134
ret

Function at 0x402fb0
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x190
lea eax, [esp]
push esi
push eax
push 2
call dword [sym.imp.WSOCK32.dll_WSAStartup]
mov esi, eax
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
test esi, esi
pop esi
jne 0x402fe9
mov ecx, dword [sym.imp.WSOCK32.dll_WSACleanup]
push ecx
call fcn.0040352b
add esp, 4
neg eax
sbb eax, eax
and eax, 0x15f90
add esp, 0x190
ret
Function at 0x401246
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
xor ebx, ebx
push ebx
push ebx
push ecx
push dword [ebp + 8]
push ebx
push ebx
call fcn.0040a66d
mov esi, dword [0x4180e8]
add esp, 0x18
push dword [ebp + 0xc]
lea ecx, [ebp + 8]
push eax
mov dword [ebp + 8], eax
mov dword [ebp - 8], ecx
mov byte [ebp - 4], bl
call esi
cmp eax, 0x102
jne 0x401285
push 0xffffffffffffffff
push dword [ebp + 8]
call esi
lea ecx, [ebp - 8]
call fcn.00401202
pop esi
pop ebx
leave
ret 8

Function at 0x40136c
Capabilities:
Check http status code
Get http content length

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, dword [sym.imp.WININET.dll_HttpQueryInfoA]
push edi
push 8
pop ebx
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
push 0x20000013
push dword [ebp + 8]
xor edi, edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 8], ebx
mov dword [ebp - 4], edi
call esi
test eax, eax
je 0x4013f0
cmp dword [ebp - 0x10], 0xc8
jne 0x4013b4
cmp dword [ebp - 0xc], edi
je 0x4013c2
cmp dword [ebp - 0x10], 0x12e
jne 0x4013f0
cmp dword [ebp - 0xc], edi
jne 0x4013f0
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
push 0x20000005
push dword [ebp + 8]
mov dword [ebp - 0x10], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 8], ebx
mov dword [ebp - 4], edi
call esi
test eax, eax
je 0x4013f0
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
jmp 0x4013f5
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
pop ebx
leave
ret 4

Function at 0x4021be
Capabilities:
Check internet connectivity via wininet
Create http request

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x41d340]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov esi, ecx
xor edi, edi
push eax
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x24], edi
call fcn.00402075
lea eax, [ebp - 0x20]
push esi
push eax
call fcn.004094e9
pop ecx
pop ecx
mov bl, al
push edi
neg bl
push 1
lea ecx, [ebp - 0x20]
sbb bl, bl
call fcn.004018be
inc bl
je 0x402209
xor al, al
jmp 0x402255
mov eax, dword [ebp + 0xc]
mov dword [esi + 0x40], eax
push edi
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
mov eax, dword [ebp - 0x24]
and al, 4
sub al, 4
movzx eax, al
push edi
neg eax
push edi
sbb eax, eax
push edi
and eax, 4
push eax
push str.Mozilla_4.0__compatible__MSIE_7.0__Windows_NT_5.2__.NET_CLR_1.1.4322__.NET_CLR_2.0.50727_
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [esi + 0x38], eax
cmp eax, edi
jne 0x40224c
call dword [0x418048]
mov dword [esi + 0x4c], eax
jmp 0x402205
mov ecx, esi
call fcn.004012e0
mov al, 1
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040a70d
leave
ret 8
Function at 0x402775
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov eax, dword [0x41d340]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push edi
lea ecx, [ebp - 0x3c]
call fcn.00402075
mov esi, 0x418474
push esi
call fcn.00409dc1
pop ecx
push eax
push 0xffffffffffffffff
push esi
lea ecx, [ebp - 0x3c]
call fcn.0040161e
push 0x418424
lea ecx, [ebp - 0x40]
mov esi, eax
call fcn.0040239c
or dword [ebp - 0x44], 0xffffffff
xor ebx, ebx
cmp esi, 0xffffffff
je 0x40285e
xor eax, eax
push esi
mov word [ebp - 0x20], ax
push ebx
lea eax, [ebp - 0x3c]
push eax
lea ecx, [ebp - 0x20]
mov dword [ebp - 0xc], 7
mov dword [ebp - 0x10], ebx
call fcn.00401c2e
cmp dword [ebp - 0xc], 8
mov eax, dword [ebp - 0x20]
jae 0x4027f4
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x40]
call fcn.00402184
push ebx
push 1
lea ecx, [ebp - 0x20]
call fcn.004018be
mov esi, dword [ebp - 0x40]
push esi
call dword [0x4181ec]
test eax, eax
jne 0x402847
add esi, 0xfffffff0
push esi
call fcn.0040170a
lea esi, [eax + 0x10]
push esi
lea eax, [ebp - 0x40]
push 0x41846c
push eax
call fcn.004021aa
add esp, 0x10
push ebx
push dword [ebp - 0x40]
push ebx
call dword [0x4181e4]
lea ecx, [esi - 0x10]
call fcn.00401442
push ebx
push 0x80
push 2
push ebx
push 5
push 2
push edi
call dword [0x41804c]
mov dword [ebp - 0x44], eax
mov ecx, dword [ebp - 0x40]
add ecx, 0xfffffff0
call fcn.00401442
push ebx
push 1
lea ecx, [ebp - 0x3c]
call fcn.004018be
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x44]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040a70d
leave
ret