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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x449090
mov eax, dword fs:[0]
push eax
sub esp, 0x64
mov eax, dword [0x45f758]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea ecx, [ebp - 0x28]
call fcn.004015d0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x40]
call fcn.004015d0
mov byte [ebp - 4], 1
lea eax, [ebp - 0x58]
push eax
call fcn.004011a0
add esp, 4
mov dword [ebp - 0x68], eax
mov ecx, dword [ebp - 0x68]
push ecx
lea ecx, [ebp - 0x40]
call fcn.00401750
lea ecx, [ebp - 0x58]
call fcn.004016b0
push 0x44c390
lea ecx, [ebp - 0x40]
call fcn.00401a00
push eax
lea ecx, [ebp - 0x28]
call fcn.00401830
mov edx, dword [ebp + 0x10]
push edx
lea ecx, [ebp - 0x28]
call fcn.004019e0
movzx eax, byte [ebp + 0x14]
test eax, eax
je 0x4010dc
mov ecx, dword [ebp + 0x10]
push ecx
lea ecx, [ebp - 0x28]
call fcn.00401830
mov ecx, dword [ebp + 8]
call fcn.00402940
push eax
movzx edx, word [ebp + 0xc]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x60]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x6c], eax
mov ecx, dword [ebp - 0x6c]
push ecx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x70], eax
mov edx, dword [ebp - 0x60]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x64], eax
push 0x44c394
lea ecx, [ebp - 0x28]
call fcn.00402940
push eax
call fcn.0042dba9
add esp, 8
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0
je 0x401161
mov eax, dword [ebp - 0x5c]
push eax
push 1
mov ecx, dword [ebp - 0x64]
push ecx
mov edx, dword [ebp - 0x70]
push edx
call fcn.0042db2b
add esp, 0x10
mov eax, dword [ebp - 0x5c]
push eax
call fcn.0042d95d
add esp, 4
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x40]
call fcn.004016b0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.004016b0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042e9cd
mov esp, ebp
pop ebp
ret

Function at 0x407140
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44934d
mov eax, dword fs:[0]
push eax
sub esp, 0x108
mov eax, dword [0x45f758]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x104
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov ecx, dword [0x460bf0]
and ecx, 1
jne 0x4071bc
mov edx, dword [0x460bf0]
or edx, 1
mov dword [0x460bf0], edx
mov dword [ebp - 4], 0
mov ecx, 0x460bd8
call fcn.00404ec0
push 0x44b5b0
call fcn.0042d8dc
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x114]
push eax
mov ecx, 0x460bd8
call fcn.0040e2f0
push 0x5c
mov ecx, 0x460bd8
call fcn.0040e790
push str.CyberSafehouse
mov ecx, 0x460bd8
call fcn.0040e7b0
push str..dll
mov ecx, 0x460bd8
call fcn.0040e7b0
mov ecx, 0x460bd8
call fcn.004056c0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042e9cd
mov esp, ebp
pop ebp
ret
Function at 0x407220
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4493a4
mov eax, dword fs:[0]
push eax
sub esp, 0x15c
mov eax, dword [0x45f758]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x104
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea ecx, [ebp - 0x12c]
call fcn.00404ec0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x15c]
call fcn.00404ec0
mov byte [ebp - 4], 1
mov ecx, dword [ebp + 8]
push ecx
lea ecx, [ebp - 0x144]
call fcn.004014c0
mov byte [ebp - 4], 2
lea edx, [ebp - 0x12c]
push edx
lea eax, [ebp - 0x15c]
push eax
lea ecx, [ebp - 0x144]
push ecx
push 0x5c
call fcn.0042b410
add esp, 0x10
movzx edx, al
test edx, edx
jne 0x4072c3
mov dword [ebp - 0x164], 1
jmp 0x4072cd
mov dword [ebp - 0x164], 0
mov al, byte [ebp - 0x164]
mov byte [ebp - 0x15d], al
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x144]
call fcn.00405000
movzx ecx, byte [ebp - 0x15d]
test ecx, ecx
je 0x407302
mov edx, dword [ebp + 8]
push edx
lea ecx, [ebp - 0x12c]
call fcn.0040e2f0
mov eax, dword [0x460c0c]
and eax, 1
jne 0x40733a
mov ecx, dword [0x460c0c]
or ecx, 1
mov dword [0x460c0c], ecx
mov byte [ebp - 4], 3
mov ecx, 0x460bf4
call fcn.00404ec0
push 0x44b5c0
call fcn.0042d8dc
add esp, 4
mov byte [ebp - 4], 1
lea edx, [ebp - 0x114]
push edx
mov ecx, 0x460bf4
call fcn.0040e2f0
push 0x5c
mov ecx, 0x460bf4
call fcn.0040e790
lea eax, [ebp - 0x12c]
push eax
mov ecx, 0x460bf4
call fcn.0040e770
mov ecx, 0x460bf4
call fcn.004056c0
mov dword [ebp - 0x168], eax
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x15c]
call fcn.00405000
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x12c]
call fcn.00405000
mov eax, dword [ebp - 0x168]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042e9cd
mov esp, ebp
pop ebp
ret
Function at 0x407630
Capabilities:
Get proxy
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44941f
mov eax, dword fs:[0]
push eax
sub esp, 0x138
mov eax, dword [0x45f758]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea eax, [ebp - 0x130]
push eax
push 0x20019
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionInternet_Settings
push connect
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [ebp - 0x12c], eax
cmp dword [ebp - 0x12c], 0
jne 0x4077e6
cmp dword [ebp - 0x130], 0
je 0x4077e6
mov dword [ebp - 0x134], 0x100
lea ecx, [ebp - 0x134]
push ecx
mov edx, 1
imul edx, edx, 0
lea eax, [ebp + edx - 0x110]
push eax
lea ecx, [ebp - 0x13c]
push ecx
push 0
push str.ProxyEnable
mov edx, dword [ebp - 0x130]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x12c], eax
cmp dword [ebp - 0x12c], 0
jne 0x4076ed
cmp dword [ebp - 0x110], 0
jne 0x407701
mov eax, dword [ebp - 0x130]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
jmp 0x4077e8
mov dword [ebp - 0x140], str.ProxyServer
mov dword [ebp - 0x134], 0x100
lea ecx, [ebp - 0x134]
push ecx
mov edx, 1
imul edx, edx, 0
lea eax, [ebp + edx - 0x110]
push eax
lea ecx, [ebp - 0x13c]
push ecx
push 0
mov edx, dword [ebp - 0x140]
push edx
mov eax, dword [ebp - 0x130]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x12c], eax
mov ecx, dword [ebp - 0x134]
mov dword [ebp - 0x138], ecx
cmp dword [ebp - 0x138], 0x100
jae 0x407769
jmp 0x40776e
call fcn.00430a28
mov edx, dword [ebp - 0x138]
mov byte [ebp + edx - 0x110], 0
mov eax, dword [ebp - 0x130]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x12c], 0
je 0x407796
xor eax, eax
jmp 0x4077e8
lea ecx, [ebp - 0x110]
push ecx
lea ecx, [ebp - 0x128]
call fcn.004014c0
mov dword [ebp - 4], 0
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x128]
push ecx
call fcn.004073c0
add esp, 0xc
mov dword [ebp - 0x144], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x128]
call fcn.00405000
mov eax, dword [ebp - 0x144]
jmp 0x4077e8
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042e9cd
mov esp, ebp
pop ebp
ret
Function at 0x407810
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
mov eax, dword [0x45f758]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x50], 0
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0xffffffff
jne 0x407843
xor eax, eax
jmp 0x40795e
push 0x10
push 0
lea eax, [ebp - 0x14]
push eax
call fcn.00430db0
add esp, 0xc
mov ecx, 2
mov word [ebp - 0x14], cx
movzx edx, word [ebp + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x12], ax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x10], eax
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov dword [ebp - 0x48], eax
push 0x10
mov ecx, dword [ebp - 0x48]
push ecx
mov edx, dword [ebp - 0x44]
push edx
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
push 0x10
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x44]
push ecx
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0xffffffff
jne 0x4078b5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x60], eax
cmp dword [ebp - 0x60], 0x2733
jne 0x4078bb
cmp dword [ebp - 0x4c], 0xffffffff
je 0x4078dd
cmp dword [ebp - 0x4c], 0xffffffff
je 0x4078ca
mov dword [ebp - 0x54], 1
jmp 0x4078d1
mov dword [ebp - 0x54], 0
mov edx, dword [ebp - 0x54]
mov dword [ebp - 0x50], edx
jmp 0x407947
push 0
push 0x2710
push 0
lea eax, [ebp - 0x48]
push eax
push 1
call dword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
mov dword [ebp - 0x58], eax
cmp dword [ebp - 0x58], 0xffffffff
je 0x407904
cmp dword [ebp - 0x58], 0x102
jne 0x407908
jmp 0x407947
lea ecx, [ebp - 0x40]
push ecx
mov edx, dword [ebp - 0x48]
push edx
mov eax, dword [ebp - 0x44]
push eax
call dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
test eax, eax
je 0x407922
jmp 0x407947
mov ecx, 4
shl ecx, 2
cmp dword [ebp + ecx - 0x3c], 0
jne 0x40793a
mov dword [ebp - 0x5c], 1
jmp 0x407941
mov dword [ebp - 0x5c], 0
mov edx, dword [ebp - 0x5c]
mov dword [ebp - 0x50], edx
mov eax, dword [ebp - 0x44]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 0x48]
push ecx
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
mov eax, dword [ebp - 0x50]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042e9cd
mov esp, ebp
pop ebp
ret
Function at 0x407970
Capabilities:
Initialize winsock library
Resolve dns

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x449447
mov eax, dword fs:[0]
push eax
push ecx
sub esp, 0x1bc
mov eax, dword [0x45f758]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
call dword [sym.imp.WS2_32.dll_WSACleanup]
lea eax, [ebp - 0x1a4]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [ebp - 0x1b4], eax
cmp dword [ebp - 0x1b4], 0
je 0x4079e4
mov ecx, dword [ebp - 0x1b4]
push ecx
push 0x44cb2c
call fcn.00421c70
add esp, 8
xor eax, eax
jmp 0x407b0c
mov dword [ebp - 4], 0
push str.www.google.com
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov dword [ebp - 0x1ac], eax
cmp dword [ebp - 0x1ac], 0
jne 0x407a0c
xor eax, eax
jmp 0x407b0c
push 4
mov edx, 4
imul edx, edx, 0
mov eax, dword [ebp - 0x1ac]
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx + edx]
push edx
lea eax, [ebp - 0x1cc]
push eax
call fcn.0042dc90
add esp, 0xc
push 0x50
mov ecx, dword [ebp - 0x1cc]
push ecx
call fcn.00407810
add esp, 8
mov dword [ebp - 0x1b8], eax
cmp dword [ebp - 0x1b8], 0
jne 0x407ad7
lea edx, [ebp - 0x1a8]
push edx
lea eax, [ebp - 0x1b0]
push eax
call fcn.00407630
add esp, 8
mov dword [ebp - 0x1c0], eax
cmp dword [ebp - 0x1c0], 0
je 0x407ad1
mov ecx, dword [ebp - 0x1b0]
mov dword [ebp - 0x1c8], ecx
movzx edx, word [ebp - 0x1a8]
push edx
mov eax, dword [ebp - 0x1c8]
push eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
push str.Proxy_detected:__s:_i__trying_to_connect_n
call fcn.00421be0
add esp, 0xc
movzx ecx, word [ebp - 0x1a8]
push ecx
mov edx, dword [ebp - 0x1b0]
push edx
call fcn.00407810
add esp, 8
mov dword [ebp - 0x1bc], eax
mov eax, dword [ebp - 0x1bc]
jmp 0x407b0c
xor eax, eax
jmp 0x407b0c
mov eax, 1
jmp 0x407b0c
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0042e9cd
mov esp, ebp
pop ebp
ret
Function at 0x407b30
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44949b
mov eax, dword fs:[0]
push eax
sub esp, 0x5a0
mov eax, dword [0x45f758]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea eax, [ebp - 0x564]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00422fb0
add esp, 8
test eax, eax
je 0x407b79
xor eax, eax
jmp 0x407d68
mov dword [ebp - 0x5a4], 0x103
lea edx, [ebp - 0x5ac]
push edx
lea eax, [ebp - 0x5a4]
push eax
lea ecx, [ebp - 0x524]
push ecx
lea edx, [ebp - 0x564]
push edx
call sub.WS2_32.dll_WSCGetProviderPath
cmp eax, 0xffffffff
jne 0x407bb0
xor eax, eax
jmp 0x407d68
lea ecx, [ebp - 0x554]
call fcn.00404ec0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x594]
call fcn.00404ec0
mov byte [ebp - 4], 1
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x57c]
call fcn.004014c0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x554]
push ecx
lea edx, [ebp - 0x594]
push edx
lea eax, [ebp - 0x57c]
push eax
push 0x5c
call fcn.0042b410
add esp, 0x10
movzx ecx, al
test ecx, ecx
jne 0x407c16
mov dword [ebp - 0x59c], 1
jmp 0x407c20
mov dword [ebp - 0x59c], 0
mov dl, byte [ebp - 0x59c]
mov byte [ebp - 0x595], dl
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x57c]
call fcn.00405000
movzx eax, byte [ebp - 0x595]
test eax, eax
je 0x407c55
mov ecx, dword [ebp + 8]
push ecx
lea ecx, [ebp - 0x554]
call fcn.0040e2f0
push 0x104
lea edx, [ebp - 0x114]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea ecx, [ebp - 0x53c]
call fcn.00404ec0
mov byte [ebp - 4], 3
lea eax, [ebp - 0x114]
push eax
lea ecx, [ebp - 0x53c]
call fcn.0040e2f0
push 0x5c
lea ecx, [ebp - 0x53c]
call fcn.0040e790
lea ecx, [ebp - 0x554]
push ecx
lea ecx, [ebp - 0x53c]
call fcn.0040e770
push 0x104
lea edx, [ebp - 0x31c]
push edx
lea ecx, [ebp - 0x53c]
call fcn.00403680
add eax, 1
push eax
lea ecx, [ebp - 0x53c]
call fcn.004056c0
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea eax, [ebp - 0x524]
push eax
call fcn.004316fe
add esp, 4
lea ecx, [ebp - 0x31c]
push ecx
call fcn.004316fe
add esp, 4
lea edx, [ebp - 0x31c]
push edx
lea eax, [ebp - 0x524]
push eax
call fcn.00431293
add esp, 8
test eax, eax
jne 0x407d1c
mov dword [ebp - 0x5a0], 1
jmp 0x407d26
mov dword [ebp - 0x5a0], 0
mov ecx, dword [ebp - 0x5a0]
mov dword [ebp - 0x5a8], ecx
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x53c]
call fcn.00405000
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x594]
call fcn.00405000
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x554]
call fcn.00405000
mov eax, dword [ebp - 0x5a8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042e9cd
mov esp, ebp
pop ebp
ret
Function at 0x407d90
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4494fa
mov eax, dword fs:[0]
push eax
sub esp, 0x5a4
mov eax, dword [0x45f758]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea eax, [ebp - 0x564]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00423050
add esp, 8
test eax, eax
je 0x407dd9
xor eax, eax
jmp 0x407ffa
mov dword [ebp - 0x5ac], 0x103
lea edx, [ebp - 0x5b0]
push edx
lea eax, [ebp - 0x5ac]
push eax
lea ecx, [ebp - 0x524]
push ecx
lea edx, [ebp - 0x564]
push edx
call sub.WS2_32.dll_WSCGetProviderPath
cmp eax, 0xffffffff
jne 0x407e10
xor eax, eax
jmp 0x407ffa
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x59c]
call fcn.0040d970
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x554]
call fcn.00404ec0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x594]
call fcn.00404ec0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x59c]
call fcn.0040e630
push eax
lea ecx, [ebp - 0x57c]
call fcn.004014c0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x554]
push ecx
lea edx, [ebp - 0x594]
push edx
lea eax, [ebp - 0x57c]
push eax
push 0x5c
call fcn.0042b410
add esp, 0x10
movzx ecx, al
test ecx, ecx
jne 0x407e91
mov dword [ebp - 0x5a0], 1
jmp 0x407e9b
mov dword [ebp - 0x5a0], 0
mov dl, byte [ebp - 0x5a0]
mov byte [ebp - 0x595], dl
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x57c]
call fcn.00405000
movzx eax, byte [ebp - 0x595]
test eax, eax
je 0x407ed8
lea ecx, [ebp - 0x59c]
call fcn.0040e630
push eax
lea ecx, [ebp - 0x554]
call fcn.0040e2f0
push 0x104
lea ecx, [ebp - 0x114]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea ecx, [ebp - 0x53c]
call fcn.00404ec0
mov byte [ebp - 4], 4
lea edx, [ebp - 0x114]
push edx
lea ecx, [ebp - 0x53c]
call fcn.0040e2f0
push 0x5c
lea ecx, [ebp - 0x53c]
call fcn.0040e790
lea eax, [ebp - 0x554]
push eax
lea ecx, [ebp - 0x53c]
call fcn.0040e770
push 0x104
lea ecx, [ebp - 0x31c]
push ecx
lea ecx, [ebp - 0x53c]
call fcn.00403680
add eax, 1
push eax
lea ecx, [ebp - 0x53c]
call fcn.004056c0
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea edx, [ebp - 0x524]
push edx
call fcn.004316fe
add esp, 4
lea eax, [ebp - 0x31c]
push eax
call fcn.004316fe
add esp, 4
lea ecx, [ebp - 0x31c]
push ecx
lea edx, [ebp - 0x524]
push edx
call fcn.00431293
add esp, 8
test eax, eax
jne 0x407f9f
mov dword [ebp - 0x5a4], 1
jmp 0x407fa9
mov dword [ebp - 0x5a4], 0
mov eax, dword [ebp - 0x5a4]
mov dword [ebp - 0x5a8], eax
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x53c]
call fcn.00405000
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x594]
call fcn.00405000
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x554]
call fcn.00405000
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x59c]
call fcn.0040e030
mov eax, dword [ebp - 0x5a8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042e9cd
mov esp, ebp
pop ebp
ret
Function at 0x4083e0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x438
mov eax, dword [0x45f758]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x438], 0
mov dword [ebp - 0x420], 0
mov dword [ebp - 0x418], 0
mov dword [ebp - 0x424], 0
lea eax, [ebp - 0x424]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00426c90
add esp, 8
mov dword [ebp - 0x418], eax
cmp dword [ebp - 0x418], 0
jne 0x408454
push str.TestChain:_Unable_to_enumerate_catalog__n
call fcn.00421c70
add esp, 4
mov eax, 1
jmp 0x408638
mov dword [ebp - 0x41c], 0
jmp 0x40846f
mov edx, dword [ebp - 0x41c]
add edx, 1
mov dword [ebp - 0x41c], edx
mov eax, dword [ebp - 0x41c]
cmp eax, dword [ebp - 0x424]
jge 0x408623
mov dword [ebp - 0x42c], 0x103
lea ecx, [ebp - 0x434]
push ecx
lea edx, [ebp - 0x42c]
push edx
lea eax, [ebp - 0x414]
push eax
mov ecx, dword [ebp - 0x41c]
imul ecx, ecx, 0x274
mov edx, dword [ebp - 0x418]
lea eax, [edx + ecx + 0x14]
push eax
call sub.WS2_32.dll_WSCGetProviderPath
mov dword [ebp - 0x430], eax
cmp dword [ebp - 0x430], 0xffffffff
jne 0x4084e9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.TestChain:_WSCGetProviderPath_failed_with_error_code:__i_n
call fcn.00421be0
add esp, 8
mov eax, 1
jmp 0x408638
push 0x104
lea ecx, [ebp - 0x20c]
push ecx
lea edx, [ebp - 0x414]
push edx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
jne 0x408524
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.TestChain:_ExpandEnvironmentStrings_failed_with_error_code:__i_n
call fcn.00421be0
add esp, 8
mov eax, 1
jmp 0x408638
lea eax, [ebp - 0x20c]
push eax
mov ecx, dword [ebp - 0x41c]
imul ecx, ecx, 0x274
mov edx, dword [ebp - 0x418]
lea eax, [edx + ecx + 0x74]
push eax
push str.Trying_to_load_provider:__S__file_name:__S__result__
call fcn.00421be0
add esp, 0xc
lea ecx, [ebp - 0x20c]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 0x428], eax
cmp dword [ebp - 0x428], 0
je 0x40858a
mov edx, dword [ebp - 0x428]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push str._Success_n
call fcn.00421be0
add esp, 4
jmp 0x40861e
push str._Failure_n
call fcn.00421be0
add esp, 4
lea eax, [ebp - 0x20c]
push eax
mov ecx, dword [ebp - 0x41c]
imul ecx, ecx, 0x274
mov edx, dword [ebp - 0x418]
lea eax, [edx + ecx + 0x74]
push eax
push str.Failed_to_load_provider:__S__file_name:__S_n
call fcn.00421c70
add esp, 0xc
call fcn.004136c0
mov ecx, eax
call fcn.004136a0
push eax
mov ecx, dword [ebp - 0x41c]
imul ecx, ecx, 0x274
mov edx, dword [ebp - 0x418]
lea eax, [edx + ecx + 0x74]
push eax
call fcn.00413560
add esp, 8
test eax, eax
je 0x40860b
push str.This_is_our_LSP_that_broke_the_chain__n
call fcn.00421c70
add esp, 4
mov dword [ebp - 0x420], 2
jmp 0x40861e
cmp dword [ebp - 0x420], 0
jne 0x40861e
mov dword [ebp - 0x420], 1
jmp 0x408460
mov ecx, dword [ebp - 0x418]
push ecx
call fcn.00426ee0
add esp, 4
mov eax, dword [ebp - 0x420]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042e9cd
mov esp, ebp
pop ebp
ret
Function at 0x41d500
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x224
mov eax, dword [0x45f758]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 0xc], 0
jne 0x41d520
xor eax, eax
jmp 0x41d659
mov dword [ebp - 0x214], 0
mov dword [ebp - 0x218], 0
lea eax, [ebp - 0x218]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00426c90
add esp, 8
mov dword [ebp - 0x214], eax
cmp dword [ebp - 0x214], 0
jne 0x41d56a
push str.GetLSPFileByID:_Unable_to_enumerate_catalog__n
call fcn.00421c70
add esp, 4
xor eax, eax
jmp 0x41d659
mov dword [ebp - 0x210], 0
jmp 0x41d585
mov edx, dword [ebp - 0x210]
add edx, 1
mov dword [ebp - 0x210], edx
mov eax, dword [ebp - 0x210]
cmp eax, dword [ebp - 0x218]
jge 0x41d657
mov ecx, dword [ebp - 0x210]
imul ecx, ecx, 0x274
mov edx, dword [ebp - 0x214]
mov eax, dword [edx + ecx + 0x24]
cmp eax, dword [ebp + 0xc]
jne 0x41d652
mov dword [ebp - 0x21c], 0x103
lea ecx, [ebp - 0x224]
push ecx
lea edx, [ebp - 0x21c]
push edx
lea eax, [ebp - 0x20c]
push eax
mov ecx, dword [ebp - 0x210]
imul ecx, ecx, 0x274
mov edx, dword [ebp - 0x214]
lea eax, [edx + ecx + 0x14]
push eax
call sub.WS2_32.dll_WSCGetProviderPath
mov dword [ebp - 0x220], eax
cmp dword [ebp - 0x220], 0xffffffff
jne 0x41d618
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetLSPFileByID:_WSCGetProviderPath_failed_with_error_code:__i_n
call fcn.00421be0
add esp, 8
xor eax, eax
jmp 0x41d659
push 0x104
push 0x460f40
lea ecx, [ebp - 0x20c]
push ecx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
jne 0x41d64b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetLSPFileByID:_ExpandEnvironmentStrings_failed_with_error_code:__i_n
call fcn.00421be0
add esp, 8
xor eax, eax
jmp 0x41d659
mov eax, 0x460f40
jmp 0x41d659
jmp 0x41d576
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042e9cd
mov esp, ebp
pop ebp
ret