joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40dca0
Capabilities:
Create udp socket
Send data
Send data on socket
Send http request
Send http request with host header
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov dword [ebp - 8], 0
mov dword [ebp - 4], 0
push 0x11
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
je 0x40de01
xor eax, eax
mov word [ebp - 0x38], ax
xor ecx, ecx
mov dword [ebp - 0x36], ecx
mov dword [ebp - 0x32], ecx
mov dword [ebp - 0x2e], ecx
mov word [ebp - 0x2a], cx
mov edx, 2
mov word [ebp - 0x38], dx
push 0x76c
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x36], ax
push str.239.255.255.250
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x34], eax
mov byte [ebp - 0x15], 1
push 1
lea eax, [ebp - 0x15]
push eax
push 0x20
push 0xffff
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.WS2_32.dll_setsockopt]
xor edx, edx
mov word [ebp - 0x28], dx
xor eax, eax
mov dword [ebp - 0x26], eax
mov dword [ebp - 0x22], eax
mov dword [ebp - 0x1e], eax
mov word [ebp - 0x1a], ax
mov ecx, 2
mov word [ebp - 0x28], cx
call fcn.0040b010
mov dword [ebp - 0x24], eax
push 0x10
lea edx, [ebp - 0x28]
push edx
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.WS2_32.dll_bind]
mov dword [ebp - 0x14], str.M_SEARCH__HTTP_1.1_r_nST:urn:schemas_upnp_org:device:InternetGatewayDevice:1_r_nMX:_3_r_nMan:_ssdp:discover__r_nHOST:_239.255.255.250:1900_r_n_r_n
push 0x10
lea ecx, [ebp - 0x38]
push ecx
push 0
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.WS2_32.dll_sendto]
mov dword [ebp - 0x10], 1
lea edx, [ebp - 0x10]
push edx
push 0x8004667e
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov ecx, 1
test ecx, ecx
je 0x40ddf5
mov dword [ebp - 0x3c], 0
lea edx, [ebp - 0x3c]
push edx
mov eax, dword [ebp - 0xc]
push eax
call fcn.0040de20
add esp, 8
movzx ecx, al
test ecx, ecx
jne 0x40ddc4
jmp 0x40ddf5
mov edx, dword [ebp - 4]
lea eax, [edx*4 + 4]
push eax
mov ecx, dword [ebp - 8]
push ecx
call fcn.0040a570
add esp, 8
mov dword [ebp - 8], eax
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x3c]
mov dword [eax + edx*4], ecx
mov edx, dword [ebp - 4]
add edx, 1
mov dword [ebp - 4], edx
jmp 0x40dd9b
mov eax, dword [ebp - 0xc]
push eax
call fcn.0040b0d0
add esp, 4
cmp dword [ebp - 8], 0
je 0x40de0f
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 8]
mov dword [ecx], edx
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
Function at 0x40de20
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x410
mov byte [ebp - 0x401], 0
mov dword [ebp - 0x408], 0
jmp 0x40de4b
mov eax, dword [ebp - 0x408]
add eax, 1
mov dword [ebp - 0x408], eax
cmp dword [ebp - 0x408], 2
jge 0x40df04
push 0
push 0
push 0
push 0x400
lea ecx, [ebp - 0x400]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp eax, 0xffffffff
jne 0x40de86
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40de3c
mov byte [ebp - 0x401], 1
push 0xf
push str.HTTP_1.1_200_OK
lea eax, [ebp - 0x400]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCmpNIA]
test eax, eax
jne 0x40deff
push str.LOCATION:
lea ecx, [ebp - 0x400]
push ecx
call dword [sym.imp.SHLWAPI.dll_StrStrIA]
mov dword [ebp - 0x40c], eax
cmp dword [ebp - 0x40c], 0
je 0x40deff
mov edx, dword [ebp - 0x40c]
add edx, 0xa
mov dword [ebp - 0x410], edx
push 0xd
mov eax, dword [ebp - 0x410]
push eax
call dword [sym.imp.SHLWAPI.dll_StrChrA]
sub eax, dword [ebp - 0x410]
push eax
mov ecx, dword [ebp - 0x410]
push ecx
call fcn.0040ce30
add esp, 8
mov edx, dword [ebp + 0xc]
mov dword [edx], eax
jmp 0x40de3c
mov al, byte [ebp - 0x401]
mov esp, ebp
pop ebp
ret
Function at 0x40e150
Capabilities:
Connect to http server
Create http request
Parse url
Read data from internet
Receive data
Send data
Send http request

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x754
mov dword [ebp - 0x304], 0
mov dword [ebp - 0x344], 0
push 0x38
push 0
lea eax, [ebp - 0x340]
push eax
call sub.ntdll.dll_memset
add esp, 0xc
mov dword [ebp - 0x344], 0x3c
lea ecx, [ebp - 0x100]
mov dword [ebp - 0x334], ecx
mov dword [ebp - 0x330], 0x100
lea edx, [ebp - 0x300]
mov dword [ebp - 0x318], edx
mov dword [ebp - 0x314], 0x200
lea eax, [ebp - 0x344]
push eax
push 0x10000000
push 0
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.WININET.dll_InternetCrackUrlA]
push 0
push 0
push 0
push 1
push 0
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0x308], eax
cmp dword [ebp - 0x308], 0
je 0x40e367
push 0
push 0
push 3
push 0
push 0
movzx edx, word [ebp - 0x32c]
push edx
lea eax, [ebp - 0x100]
push eax
mov ecx, dword [ebp - 0x308]
push ecx
call dword [sym.imp.WININET.dll_InternetConnectA]
mov dword [ebp - 0x348], eax
cmp dword [ebp - 0x348], 0
je 0x40e35a
push 0
push 0
push 0
push 0
push 0
lea edx, [ebp - 0x300]
push edx
push 0x411d40
mov eax, dword [ebp - 0x348]
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov dword [ebp - 0x34c], eax
cmp dword [ebp - 0x34c], 0
je 0x40e34d
push 0
push 0
push 0
push 0
mov ecx, dword [ebp - 0x34c]
push ecx
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
je 0x40e340
cmp dword [ebp + 0xc], 0
je 0x40e336
mov dword [ebp - 0x350], 0
mov edx, 1
test edx, edx
je 0x40e329
lea eax, [ebp - 0x754]
push eax
push 0x400
lea ecx, [ebp - 0x750]
push ecx
mov edx, dword [ebp - 0x34c]
push edx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x40e2cb
cmp dword [ebp - 0x754], 0
jne 0x40e2cd
jmp 0x40e329
mov eax, dword [ebp - 0x350]
add eax, dword [ebp - 0x754]
push eax
mov ecx, dword [ebp - 0x304]
push ecx
call fcn.0040a570
add esp, 8
mov dword [ebp - 0x304], eax
mov edx, dword [ebp - 0x754]
push edx
lea eax, [ebp - 0x750]
push eax
mov ecx, dword [ebp - 0x304]
add ecx, dword [ebp - 0x350]
push ecx
call sub.ntdll.dll_memcpy
add esp, 0xc
mov edx, dword [ebp - 0x350]
add edx, dword [ebp - 0x754]
mov dword [ebp - 0x350], edx
jmp 0x40e291
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x350]
mov dword [eax], ecx
jmp 0x40e340
mov dword [ebp - 0x304], 1
mov edx, dword [ebp - 0x34c]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x348]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, dword [ebp - 0x308]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x304]
mov esp, ebp
pop ebp
ret
Function at 0x40ea80
Capabilities:
Connect to http server
Create http request
Parse url
Read data from internet
Receive data
Send data
Send http request

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x75c
mov dword [ebp - 0x304], 0
mov dword [ebp - 0x344], 0
push 0x38
push 0
lea eax, [ebp - 0x340]
push eax
call sub.ntdll.dll_memset
add esp, 0xc
mov dword [ebp - 0x344], 0x3c
lea ecx, [ebp - 0x100]
mov dword [ebp - 0x334], ecx
mov dword [ebp - 0x330], 0x100
lea edx, [ebp - 0x300]
mov dword [ebp - 0x318], edx
mov dword [ebp - 0x314], 0x200
lea eax, [ebp - 0x344]
push eax
push 0x10000000
push 0
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.WININET.dll_InternetCrackUrlA]
push 0
push 0
push 0
push 1
push str.Mozilla_4.0__compatible__UPnP_1.0__Windows_9x_
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0x308], eax
cmp dword [ebp - 0x308], 0
je 0x40ecb1
push 0
push 0
push 3
push 0
push 0
movzx edx, word [ebp - 0x32c]
push edx
lea eax, [ebp - 0x100]
push eax
mov ecx, dword [ebp - 0x308]
push ecx
call dword [sym.imp.WININET.dll_InternetConnectA]
mov dword [ebp - 0x348], eax
cmp dword [ebp - 0x348], 0
je 0x40eca4
push 0
push 0
push 0
push 0
push 0
lea edx, [ebp - 0x300]
push edx
push str.POST
mov eax, dword [ebp - 0x348]
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov dword [ebp - 0x34c], eax
cmp dword [ebp - 0x34c], 0
je 0x40ec97
push 0xa0000000
push 0xffffffffffffffff
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0x34c]
push edx
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersA]
mov dword [ebp - 0x350], str.Content_Type:_text_xml__charset_utf_8__r_nConnection:_Close_r_nCache_Control:_no_cache_r_nPragma:_no_cache_r_n
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax]
push ecx
mov edx, dword [ebp + 0x10]
push edx
push 0xffffffffffffffff
mov eax, dword [ebp - 0x350]
push eax
mov ecx, dword [ebp - 0x34c]
push ecx
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
je 0x40ec8a
mov dword [ebp - 0x354], 0
mov edx, 1
test edx, edx
je 0x40ec7f
lea eax, [ebp - 0x75c]
push eax
push 0x400
lea ecx, [ebp - 0x758]
push ecx
mov edx, dword [ebp - 0x34c]
push edx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x40ec21
cmp dword [ebp - 0x75c], 0
jne 0x40ec23
jmp 0x40ec7f
mov eax, dword [ebp - 0x354]
add eax, dword [ebp - 0x75c]
push eax
mov ecx, dword [ebp - 0x304]
push ecx
call fcn.0040a570
add esp, 8
mov dword [ebp - 0x304], eax
mov edx, dword [ebp - 0x75c]
push edx
lea eax, [ebp - 0x758]
push eax
mov ecx, dword [ebp - 0x304]
add ecx, dword [ebp - 0x354]
push ecx
call sub.ntdll.dll_memcpy
add esp, 0xc
mov edx, dword [ebp - 0x354]
add edx, dword [ebp - 0x75c]
mov dword [ebp - 0x354], edx
jmp 0x40ebe7
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 0x354]
mov dword [eax], ecx
mov edx, dword [ebp - 0x34c]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x348]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, dword [ebp - 0x308]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x304]
mov esp, ebp
pop ebp
ret
Function at 0x40ed00
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov dword [ebp - 4], 0
push 0
push 0
push 3
push 0
push 1
push accept
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
je 0x40ed48
push 0
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 4], eax
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
Function at 0x40ed50
Capabilities:
Get file size
Read file via mapping
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov byte [ebp - 0x11], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 4], 0
push 0
push 0
push 3
push 0
push 0
push accept
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
je 0x40eeaa
push 0
push 0
push 0
push 2
push 0
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x40eea0
push 0
push 0
push 0
push 4
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x40ee96
push 0
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0x100
jbe 0x40ee8c
mov ecx, dword [ebp - 0x1c]
push ecx
call fcn.0040cd80
add esp, 4
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x40ee8c
mov edx, dword [ebp - 8]
sub edx, 0x100
mov eax, dword [ebp - 0x10]
cmp dword [eax + 0x18], edx
jne 0x40ee8c
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x18]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp - 0x1c]
add ecx, 0x100
push ecx
push 0x10
mov edx, dword [ebp - 0x10]
add edx, 8
push edx
call fcn.0040c720
add esp, 0x10
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x40ee8c
lea eax, [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 4]
push edx
call fcn.0040aa70
add esp, 0xc
push 0x10
lea eax, [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 0x10]
add ecx, 8
push ecx
call sub.ntdll.dll_memcmp
add esp, 0xc
test eax, eax
je 0x40ee8c
mov edx, dword [ebp - 4]
push edx
call fcn.0040a740
add esp, 4
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 4], 0
je 0x40ef04
push 0
push 0
push 2
push 0
push 0
push 0x40000000
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
je 0x40eef8
mov byte [ebp - 0x11], 1
push 0
lea ecx, [ebp - 8]
push ecx
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 4]
push eax
call fcn.0040a740
add esp, 4
mov al, byte [ebp - 0x11]
mov esp, ebp
pop ebp
ret
Function at 0x40ef10
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
push 0x44
push 0
lea eax, [ebp - 0x60]
push eax
call sub.ntdll.dll_memset
add esp, 0xc
push 0x10
push 0
lea ecx, [ebp - 0x14]
push ecx
call sub.ntdll.dll_memset
add esp, 0xc
mov dword [ebp - 0x60], 0x44
mov dword [ebp - 0x34], 1
mov edx, 5
mov word [ebp - 0x30], dx
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x60]
push ecx
push 0
push 0
push 0x20
push 0
push 0
push 0
mov edx, dword [ebp + 8]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
cmp eax, 1
jne 0x40ef81
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov al, 1
jmp 0x40efb8
push 0
push 0
push 0
mov eax, dword [ebp + 8]
push eax
push 0x41281c
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x64], ecx
cmp dword [ebp - 0x64], 0x20
jle 0x40efb6
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov al, 1
jmp 0x40efb8
xor al, al
mov esp, ebp
pop ebp
ret

Function at 0x40efc0
Capabilities:
Create http request
Get http content length
Reference http user-agent string

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov byte [ebp - 5], 0
push 0
push 0
push 0
push 1
push 0x412828
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x40f058
push 0
push 0
push 0
push 0
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x40f04e
mov dword [ebp - 0x14], 4
push 0
lea edx, [ebp - 0x14]
push edx
lea eax, [ebp - 0x10]
push eax
push 0x20000005
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
cmp dword [ebp - 0x10], 0x1388
jbe 0x40f044
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x10]
cmp eax, dword [edx]
je 0x40f044
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 0x10]
mov dword [ecx], edx
mov byte [ebp - 5], 1
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov al, byte [ebp - 5]
mov esp, ebp
pop ebp
ret
Function at 0x40f669
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x40f69a
mov eax, dword fs:[4]
mov dword [ebp + 8], eax
mov eax, dword fs:[8]
mov dword [ebp - 4], eax
cmp ebx, dword [ebp - 4]
jb 0x40f6a1
cmp ebx, dword [ebp + 8]
jae 0x40f6a1
xor eax, eax
jmp 0x40f887
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x40f6b2
xor eax, eax
inc eax
jmp 0x40f886
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x40f6c4
cmp ecx, edx
jae 0x40f728
cmp dword [eax + 4], 0
je 0x40f6cd
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x40f6b9
cmp dword [ebp + 8], 0
je 0x40f6e7
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x40f728
cmp eax, esi
jae 0x40f728
mov ecx, dword [0x418788]
mov esi, ebx
and esi, 0xfffff000
xor eax, eax
test ecx, ecx
jle 0x40f709
cmp dword [eax*4 + 0x418790], esi
je 0x40f72f
inc eax
cmp eax, ecx
jl 0x40f6fb
lea eax, [ebp + 8]
push eax
push 0x1c
lea eax, [ebp - 0x20]
push eax
push 0
push ebx
or edi, 0xffffffff
push edi
call sub.ntdll.dll_NtQueryVirtualMemory
test eax, eax
jl 0x40f79f
mov eax, dword [ebp + 8]
jmp 0x40f7a1
xor eax, eax
jmp 0x40f886
test eax, eax
jle 0x40f6aa
xor edx, edx
mov ebx, 0x4187d0
inc edx
mov edi, ebx
xchg dword [edi], edx
test edx, edx
jne 0x40f6aa
cmp dword [eax*4 + 0x418790], esi
je 0x40f77e
lea eax, [ecx - 1]
test eax, eax
jl 0x40f76b
cmp dword [eax*4 + 0x418790], esi
je 0x40f767
dec eax
jns 0x40f75b
test eax, eax
jge 0x40f77c
cmp ecx, 0x10
jge 0x40f777
inc ecx
mov dword [0x418788], ecx
lea eax, [ecx - 1]
jmp 0x40f77e
je 0x40f796
xor edx, edx
test eax, eax
jl 0x40f796
lea ecx, [edx*4 + 0x418790]
mov edi, dword [ecx]
inc edx
cmp edx, eax
mov dword [ecx], esi
mov esi, edi
jle 0x40f784
xor eax, eax
xchg dword [ebx], eax
jmp 0x40f6aa
xor eax, eax
test eax, eax
je 0x40f884
cmp dword [ebp - 8], 0x1000000
jne 0x40f884
test byte [ebp - 0xc], 0xcc
je 0x40f816
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x40f884
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x40f884
cmp word [eax + 0x18], 0x10b
jne 0x40f884
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x40f884
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x40f816
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x40f816
test byte [ecx + 0x27], 0x80
jne 0x40f728
xor eax, eax
inc eax
mov ecx, eax
mov edx, 0x4187d0
xchg dword [edx], ecx
test ecx, ecx
jne 0x40f886
mov ecx, dword [0x418788]
test ecx, ecx
mov edx, ecx
jle 0x40f845
lea eax, [ecx*4 + 0x41878c]
cmp dword [eax], esi
je 0x40f845
dec edx
sub eax, 4
test edx, edx
jg 0x40f839
test edx, edx
jne 0x40f876
push 0xf
pop ebx
cmp ecx, ebx
jg 0x40f852
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x40f86a
lea eax, [edx*4 + 0x418790]
mov edi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], esi
mov esi, edi
jle 0x40f858
cmp ecx, 0x10
jge 0x40f876
inc ecx
mov dword [0x418788], ecx
xor eax, eax
mov ecx, 0x4187d0
xchg dword [ecx], eax
jmp 0x40f6aa
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x401d80
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ecx
cmp dword [0x5a1b9c], 0
push ebx
mov ebx, dword [0x5a1328]
jne 0x401e2d
push esi
push 0xa
push 0x11
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
je 0x401e2c
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push esi
push ebx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x401e2b
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push edi
push 0
mov ebx, eax
mov dword [esp + 0x14], 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
push edi
push ebx
push eax
call fcn.0043e250
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
lea eax, [esp + 0xc]
push eax
push 1
push esi
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
mov eax, dword [esp + 0xc]
test eax, eax
je 0x401e24
push eax
call fcn.004017c0
mov eax, dword [esp + 0xc]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
pop edi
pop esi
pop ebx
pop ecx
ret
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
pop esi
pop ebx
pop ecx
ret

Function at 0x404cd0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
mov eax, dword [ebx + 0x3c]
mov eax, dword [eax + ebx + 0x80]
sub esp, 0x1c
push ebp
push esi
add eax, ebx
cmp dword [eax + 0xc], 0
push edi
lea edi, [eax + 0xc]
je 0x404d28
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
mov ecx, dword [edi]
add ecx, ebx
push ecx
push 0x457538
call ebp
test eax, eax
jne 0x404d20
mov esi, dword [edi + 4]
add esi, ebx
cmp dword [esi], eax
je 0x404d20
lea ebx, [ebx]
mov edx, dword [esp + 0x2c]
cmp dword [esi], edx
je 0x404d31
add esi, 4
cmp dword [esi], 0
jne 0x404d10
add edi, 0x14
cmp dword [edi], 0
jne 0x404cf1
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x1c
ret
push 0x1c
lea eax, [esp + 0x10]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0xc]
mov edi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea ecx, [esp + 0x20]
push ecx
push 0x40
push edx
push eax
call edi
push 4
push esi
call dword [sym.imp.KERNEL32.dll_IsBadWritePtr]
test eax, eax
jne 0x404d6b
mov dword [esi], 0x404ed0
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x10]
push edx
push eax
push ecx
call edi
mov eax, dword [esp + 0x2c]
pop edi
pop esi
pop ebp
add esp, 0x1c
ret
Function at 0x407110
Capabilities:
Hide graphical window

Disassembly:
sub esp, 0x10
push 1
push 0x11
call dword [sym.imp.GDI32.dll_GetStockObject]
push eax
mov eax, dword [edi]
push 0x30
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov ecx, dword [edi]
push 5
push ecx
call dword [sym.imp.USER32.dll_ShowWindow]
cmp dword [esi + 4], 0
lea edx, [esi + 4]
mov dword [esi + 8], esi
je 0x40716d
mov ecx, dword [edx + 4]
test ecx, ecx
je 0x407169
mov edx, dword [ecx]
mov edx, dword [edx]
lea eax, [esp]
push eax
mov dword [esp + 0xc], 1
mov dword [esp + 0x10], 4
mov dword [esp + 4], 7
call edx
add esp, 0x10
ret
cmp dword [ebx + 0x24], 4
jne 0x407169
mov ecx, dword [ebx + 0x20]
add esp, 0x10
jmp fcn.004058d0

Function at 0x407200
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push 0xffffffffffffffff
push 0x44e757
mov eax, dword fs:[0]
push eax
mov eax, dword [0x46b070]
xor eax, esp
push eax
lea eax, [esp + 4]
mov dword fs:[0], eax
mov eax, dword [esp + 0x14]
xor ecx, ecx
mov dword [eax], vtable.autodlg::dialog_base.0
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov dword [esp + 0xc], ecx
mov dword [eax + 8], ecx
mov dword [eax + 0x18], ecx
mov dword [eax + 0x1c], ecx
mov dword [eax + 0x24], ecx
mov byte [esp + 0xc], 1
mov dword [eax + 0x2c], ecx
mov dword [eax + 0x30], ecx
mov dword [eax + 0x38], ecx
mov byte [esp + 0xc], 2
mov dword [eax + 0x44], ecx
mov dword [eax + 0x48], ecx
mov byte [esp + 0xc], 3
mov dword [eax + 0x4c], ecx
mov dword [eax + 0x50], ecx
mov byte [esp + 0xc], 4
mov dword [eax + 0x60], ecx
mov dword [eax + 0x54], ecx
mov dword [eax + 0x58], ecx
mov dword [eax + 0x5c], ecx
mov dword [esp + 0xc], 0xffffffff
mov ecx, dword [esp + 4]
mov dword fs:[0], ecx
pop ecx
add esp, 0xc
ret 4

Function at 0x407bb0
Capabilities:
Hide graphical window

Disassembly:
sub esp, 0x34
push ebx
lea eax, [esp + 4]
push eax
lea ecx, [esp + 0xc]
push ecx
lea edx, [esp + 0x14]
push edx
push esi
call fcn.004077a0
lea ebx, [esi + 0xc]
call fcn.00405dc0
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x10]
push 0
add ecx, eax
add edx, eax
mov eax, dword [esp + 0x40]
push 0
mov dword [esp + 0x24], ecx
push eax
lea ecx, [esp + 0x20]
push ecx
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x30], edx
call dword [sym.imp.USER32.dll_AdjustWindowRectEx]
mov edx, dword [esi + 0x60]
mov ecx, dword [esp + 0x1c]
sub ecx, dword [esp + 0x14]
mov eax, dword [esp + 8]
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x20]
sub edx, dword [esp + 0x18]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x2c], eax
mov eax, dword [esi]
lea ecx, [esp + 0x24]
mov dword [esp + 0x34], edx
mov edx, dword [eax]
push ecx
mov ecx, esi
mov dword [esp + 0x28], 1
call edx
mov eax, dword [esi + 0x60]
push 5
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov ecx, dword [esi + 0x60]
push ecx
call dword [sym.imp.USER32.dll_UpdateWindow]
cmp dword [esi + 0x60], 0
pop ebx
setne al
add esp, 0x34
ret 4