joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4542ec
Capabilities:
Get geographical location

Disassembly:
push ebp
lea ebp, [esp - 0xe0]
sub esp, 0x160
mov eax, dword [0x4cbbe8]
xor eax, ebp
mov dword [ebp + 0xdc], eax
cmp dword [ebp + 0xec], 0x800
mov eax, dword [ebp + 0xe8]
push esi
mov dword [ebp - 0x3c], eax
mov esi, ecx
lea eax, [ebp - 0x40]
jne 0x454384
push 0x4abe04
push 4
push eax
call fcn.00474fac
push eax
call fcn.00401020
add esp, 0x10
push ebx
push edi
call fcn.00472680
mov edi, dword [eax]
call fcn.00472680
xor ebx, ebx
mov dword [eax], ebx
lea eax, [ebp - 0x40]
push eax
push dword [ebp - 0x3c]
lea eax, [ebp - 0x38]
push esi
push 0x111
mov esi, 0x112
push esi
push eax
call fcn.0046f96e
add esp, 0x18
mov dword [ebp - 0x3c], eax
call fcn.00472680
cmp dword [eax], ebx
je 0x45439b
call fcn.00472680
push dword [eax]
call fcn.0044213a
pop ecx
jmp 0x4543a2
push 4
push eax
push 3
push dword [ebp + 0xec]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
jne 0x454338
jmp 0x454414
call fcn.00472680
mov dword [eax], edi
cmp dword [ebp - 0x3c], 0xffffffff
je 0x454410
cmp dword [ebp - 0x3c], esi
jae 0x454410
lea eax, [ebp - 0x38]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
push 0x3c
mov esi, eax
lea eax, [ebp - 0x7c]
push ebx
push eax
mov dword [ebp - 0x80], 0x40
call fcn.0046faa0
add esp, 0xc
push str.KERNEL32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp eax, ebx
je 0x454402
push str.FindActCtxSectionStringA
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x454402
lea ecx, [ebp - 0x80]
push ecx
push esi
push 2
push ebx
push ebx
call eax
test eax, eax
je 0x454402
push ebx
push ebx
push esi
jmp 0x454408
push ebx
push ebx
lea eax, [ebp - 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
jmp 0x454412
xor eax, eax
pop edi
pop ebx
mov ecx, dword [ebp + 0xdc]
xor ecx, ebp
pop esi
call fcn.0046fa34
add ebp, 0xe0
leave
ret
Function at 0x46fa34
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x4cbbe8]
jne 0x46fa3e
repz ret
jmp fcn.0047f6bb

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

Disassembly:
push esi
xor esi, esi
cmp dword [esp + 8], esi
jne 0x4727d8
call fcn.00472693
mov dword [eax], esi
call fcn.00472680
push esi
push esi
push esi
push esi
push esi
mov dword [eax], 0x16
call fcn.0047c31e
add esp, 0x14
push 0x16
pop eax
pop esi
ret
test dword [esp + 0xc], 0xfffffff9
jne 0x4727b4
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x472807
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.004726a6
pop ecx
call fcn.00472680
mov eax, dword [eax]
pop esi
ret
test al, 0x10
jne 0x47282e
test al, 1
je 0x47282e
test byte [esp + 0xc], 2
je 0x47282e
call fcn.00472693
mov dword [eax], 5
call fcn.00472680
mov dword [eax], 0xd
jmp 0x4727fe
xor eax, eax
pop esi
ret
Function at 0x47e88f
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 + 0x4cc048]
je 0x47e8aa
inc edi
cmp edi, 0x17
jb 0x47e89b
cmp edi, 0x17
jae 0x47ea2a
push ebp
push 3
call fcn.00492d31
cmp eax, 1
pop ecx
je 0x47e9f6
push 3
call fcn.00492d31
test eax, eax
pop ecx
jne 0x47e8de
cmp dword [0x4cbe40], 1
je 0x47e9f6
cmp ebx, 0xfc
je 0x47ea29
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x4d66a0
push ebp
call fcn.00474fac
add esp, 0xc
test eax, eax
je 0x47e914
push esi
push esi
push esi
push esi
push esi
call fcn.0047c1ea
add esp, 0x14
push 0x104
mov esi, 0x4d66b9
push esi
push 0
mov byte [0x4d67bd], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x47e958
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.00474fac
add esp, 0xc
test eax, eax
je 0x47e958
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.0047c1ea
add esp, 0x14
push esi
call fcn.00477e00
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x47e99d
push esi
call fcn.00477e00
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x4d69b4
push 0x4b0364
sub ecx, eax
push ecx
push eax
call fcn.0046fb1a
add esp, 0x14
test eax, eax
je 0x47e99d
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.0047c1ea
add esp, 0x14
jmp 0x47e99f
xor esi, esi
push 0x4b0360
push ebx
push ebp
call fcn.00477441
add esp, 0xc
test eax, eax
je 0x47e9bf
push esi
push esi
push esi
push esi
push esi
call fcn.0047c1ea
add esp, 0x14
push dword [edi*8 + 0x4cc04c]
push ebx
push ebp
call fcn.00477441
add esp, 0xc
test eax, eax
je 0x47e9e1
push esi
push esi
push esi
push esi
push esi
call fcn.0047c1ea
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.00492b74
add esp, 0xc
jmp 0x47ea29
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x47ea29
cmp ebp, 0xffffffff
je 0x47ea29
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x4cc04c]
push dword [esi]
call fcn.00477e00
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 0x492b74
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.004803bd
xor ebx, ebx
cmp dword [0x4d6ebc], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x492c4a
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x492d2a
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x4b20bc
push edi
call esi
cmp eax, ebx
je 0x492d2a
push eax
call fcn.0048034f
mov dword [esp], 0x4b20ac
push edi
mov dword [0x4d6ebc], eax
call esi
push eax
call fcn.0048034f
mov dword [esp], 0x4b2098
push edi
mov dword [0x4d6ec0], eax
call esi
push eax
call fcn.0048034f
mov dword [0x4d6ec4], eax
lea eax, [ebp - 0xc]
push eax
call fcn.0047b3e6
test eax, eax
pop ecx
pop ecx
je 0x492c18
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0047c1ea
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x492c4a
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.0048034f
cmp eax, ebx
pop ecx
mov dword [0x4d6ecc], eax
je 0x492c4a
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.0048034f
pop ecx
mov dword [0x4d6ec8], eax
mov eax, dword [0x4d6ec8]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x492ccf
cmp dword [0x4d6ecc], ecx
je 0x492ccf
push eax
call fcn.004803c6
push dword [0x4d6ecc]
mov esi, eax
call fcn.004803c6
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x492ccf
cmp edi, ebx
je 0x492ccf
call esi
cmp eax, ebx
je 0x492c9c
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x492c9c
test byte [ebp - 0x18], 1
jne 0x492ccf
lea eax, [ebp - 0x10]
push eax
call fcn.0047b495
test eax, eax
pop ecx
je 0x492cb7
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.0047c1ea
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x492cc6
or dword [ebp + 0x10], 0x200000
jmp 0x492d0a
or dword [ebp + 0x10], 0x40000
jmp 0x492d0a
mov eax, dword [0x4d6ec0]
cmp eax, dword [ebp - 8]
je 0x492d0a
push eax
call fcn.004803c6
cmp eax, ebx
pop ecx
je 0x492d0a
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x492d0a
mov eax, dword [0x4d6ec4]
cmp eax, dword [ebp - 8]
je 0x492d0a
push eax
call fcn.004803c6
cmp eax, ebx
pop ecx
je 0x492d0a
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x4d6ebc]
call fcn.004803c6
cmp eax, ebx
pop ecx
je 0x492d2a
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x492d2c
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x49edeb
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x98
mov eax, dword [0x4cbbe8]
xor eax, ebp
mov dword [ebp + 0x74], eax
push esi
mov esi, ecx
call fcn.0049ec4a
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.0046faa0
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 0x49ee3a
cmp dword [ebp - 0x1c], 5
jb 0x49ee52
jmp 0x49ee4e
cmp dword [ebp - 0x10], 1
jne 0x49ee52
cmp dword [ebp - 0x1c], 4
ja 0x49ee4e
jne 0x49ee52
cmp dword [ebp - 0x18], 0
jbe 0x49ee52
mov byte [esi + 0xc], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x10], 0x800
mov dword [esi + 0x14], 0x4b469c
call fcn.0049ea07
test eax, eax
jge 0x49ee73
mov byte [0x4cd4c0], 1
mov ecx, dword [ebp + 0x74]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.0046fa34
add ebp, 0x78
leave
ret
Function at 0x40100a
Capabilities:
Terminate process

Disassembly:
jmp 0x402d80
mov eax, dword [esp + 8]
mov ecx, dword [eax]
mov dword [0x786558], ecx
call fcn.004132d0
lea edx, [esp + 4]
push edx
lea eax, [esp + 0xc]
call fcn.00401710
add esp, 4
test eax, eax
je 0x402dbc
mov eax, dword [0x7843e8]
push eax
call fcn.00412e60
add esp, 4
push 1
call dword [sym.imp.MSVCR90.dll_exit]
mov ecx, dword [0x784430]
mov edx, dword [0x784434]
push esi
mov esi, dword [0x78443c]
push ecx
push edx
call fcn.004026a0
add esp, 8
test eax, eax
je 0x402de5
push 2
call dword [sym.imp.MSVCR90.dll_exit]
cmp byte [section..data], 0
jne 0x402e06
call fcn.00401dd0
test eax, eax
je 0x402e06
mov dword [0x784448], 1
jmp 0x402f7c
cmp byte [0x784414], 0
je 0x402e72
push 0x40
push 0x10
push 0
push 0x182
push 0x787220
call fcn.00412760
add esp, 0x14
test al, al
jne 0x402e63
push 0x40
push 0x10
push 0
push 0x182
push 0x787280
call fcn.00412760
add esp, 0x14
test al, al
jne 0x402e63
push 1
push 0
push 0
push 0x20000
push 0x787260
call fcn.00412760
add esp, 0x14
test al, al
je 0x402e72
mov dword [0x784448], 1
jmp 0x402f7c
cmp byte [0x7843ee], 0
je 0x402e82
call fcn.00402ca0
jmp 0x402eae
mov eax, dword [esp + 8]
cmp eax, 1
jle 0x402ea5
cmp byte [0x78440e], 0
jne 0x402ea5
mov edx, dword [esp + 0xc]
lea ecx, [edx + 4]
mov edx, dword [edx]
dec eax
call fcn.00402880
jmp 0x402eae
mov eax, dword [esp + 0xc]
call fcn.00402d40
cmp byte [0x784414], 0
je 0x402f7c
cmp byte [0x784413], 0
jne 0x402ee4
cmp dword [0x787224], 0
jne 0x402ed6
cmp dword [0x787284], 0
je 0x402ee4
push str._nRepairing_tables
call dword [sym.imp.MSVCR90.dll_puts]
add esp, 4
push edi
xor edi, edi
mov dword [0x784454], 2
cmp dword [0x787224], edi
jbe 0x402f26
lea esp, [esp]
mov esi, dword [0x787230]
imul esi, edi
add esi, dword [0x787220]
call fcn.00401a40
mov edx, eax
mov ecx, esi
call fcn.00402380
inc edi
cmp edi, dword [0x787224]
jb 0x402f00
xor esi, esi
pop edi
cmp dword [0x787284], esi
jbe 0x402f4d
mov eax, dword [0x787290]
imul eax, esi
add eax, dword [0x787280]
call fcn.00401cf0
inc esi
cmp esi, dword [0x787284]
jb 0x402f31
xor esi, esi
cmp dword [0x787264], esi
jbe 0x402f7c
jmp 0x402f60
mov eax, dword [0x787270]
imul eax, esi
add eax, dword [0x787260]
call fcn.00401ad0
inc esi
cmp esi, dword [0x787264]
jb 0x402f60
mov eax, dword [0x78443c]
call fcn.00402200
cmp byte [0x784414], 0
je 0x402fa6
push 0x787220
call fcn.00412970
push 0x787280
call fcn.00412970
add esp, 8
mov eax, dword [0x784430]
push eax
call sub.MSVCR90.dll_free
mov ecx, dword [0x78444c]
push ecx
call sub.MSVCR90.dll_free
mov edx, dword [0x7843e8]
push edx
call fcn.00412e60
xor eax, eax
add esp, 0xc
cmp dword [0x784448], eax
pop esi
setne al
ret
Function at 0x404370
Capabilities:
Get geographical location

Disassembly:
sub esp, 0x10
mov eax, dword [0x7079d0]
xor eax, esp
mov dword [esp + 0xc], eax
mov eax, dword [0x78653c]
test eax, eax
jne 0x404408
mov ax, word [0x485934]
mov cl, byte [0x485936]
push 7
lea edx, [esp + 6]
push edx
mov word [esp + 8], ax
xor eax, eax
push 0x1004
push 0x800
mov byte [esp + 0x12], cl
mov dword [esp + 0x13], eax
mov word [esp + 0x17], ax
mov byte [esp + 0x19], al
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
mov ecx, str.cp932
lea eax, [esp]
mov edi, edi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4043f0
test dl, dl
je 0x4043ec
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4043f0
add eax, 2
add ecx, 2
test dl, dl
jne 0x4043d0
xor eax, eax
jmp 0x4043f5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
mov eax, 0x4fd9c8
je 0x404403
mov eax, 0x49bcd8
mov dword [0x78653c], eax
mov ecx, dword [esp + 0xc]
xor ecx, esp
call fcn.00466e0a
add esp, 0x10
ret

Function at 0x4044f0
Capabilities:
Connect socket

Disassembly:
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
push eax
push ecx
push edx
call dword [sym.imp.WS2_32.dll_connect]
ret
Function at 0x404d60
Capabilities:
Query environment variable

Disassembly:
push 0x486050
call dword [sym.imp.MSVCR90.dll_getenv]
add esp, 4
test eax, eax
je 0x404da6
mov ecx, str.Windows_NT
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x404d97
test dl, dl
je 0x404d93
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x404d97
add eax, 2
add ecx, 2
test dl, dl
jne 0x404d77
xor eax, eax
jmp 0x404d9c
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x404da6
mov eax, 1
ret
xor eax, eax
ret
Function at 0x407ff0
Capabilities:
Query environment variable
Resolve dns
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x1d4
mov eax, dword [0x7079d0]
xor eax, esp
mov dword [esp + 0x1d0], eax
rol byte [ecx], 1
add byte [eax], al

Function at 0x40b310
Capabilities:
Get common file path

Disassembly:
push esi
push str.GetSystemWindowsDirectoryA
push str.kernel32.dll
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push esi
push edi
test eax, eax
je 0x40b334
call eax
pop esi
ret
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov esi, eax
cmp esi, 8
jbe 0x40b35e
lea eax, [esi + edi - 8]
push str.System32
push eax
call dword [sym.imp.MSVCR90.dll__stricmp]
add esp, 8
test eax, eax
jne 0x40b35e
sub esi, 8
mov byte [esi + edi], al
mov eax, esi
pop esi
ret

Function at 0x40b3b0
Capabilities:
Get common file path
Query environment variable

Disassembly:
sub esp, 0x208
mov eax, dword [0x7079d0]
xor eax, esp
mov dword [esp + 0x204], eax
push ebx
push ebp
mov ebp, dword [esp + 0x214]
push 0x1c
push ebp
mov dword [esp + 0x10], 0
call fcn.0041a0c0
mov ebx, eax
add esp, 8
xor eax, eax
test ebx, ebx
je 0x40b4ce
mov dword [ebx], eax
mov dword [ebx + 4], eax
mov dword [ebx + 8], eax
mov dword [ebx + 0xc], eax
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x14], eax
push esi
push edi
mov dword [ebx + 0x18], eax
mov eax, 0x200
lea edi, [esp + 0x14]
call fcn.0040b310
test eax, eax
je 0x40b427
mov eax, edi
push eax
mov edi, ebx
mov esi, ebp
call fcn.0040b290
add esp, 4
mov dword [esp + 0x10], eax
push 0x200
lea ecx, [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x40b450
lea edx, [esp + 0x14]
push edx
mov edi, ebx
mov esi, ebp
call fcn.0040b290
add esp, 4
add dword [esp + 0x10], eax
push 0x486b50
mov edi, ebx
mov esi, ebp
call fcn.0040b290
add dword [esp + 0x14], eax
add esp, 4
mov eax, 0x200
lea esi, [esp + 0x14]
call fcn.0040b370
test eax, eax
je 0x40b488
mov eax, esi
push eax
mov esi, ebp
call fcn.0040b290
add esp, 4
add dword [esp + 0x10], eax
push str.MYSQL_HOME
call dword [sym.imp.MSVCR90.dll_getenv]
add esp, 4
test eax, eax
je 0x40b4ab
push eax
mov edi, ebx
mov esi, ebp
call fcn.0040b290
add esp, 4
add dword [esp + 0x10], eax
push 0x4852b2
mov edi, ebx
mov esi, ebp
call fcn.0040b290
add eax, dword [esp + 0x14]
add esp, 4
xor ecx, ecx
test eax, eax
setg cl
pop edi
pop esi
dec ecx
and ecx, ebx
mov eax, ecx
mov ecx, dword [esp + 0x20c]
pop ebp
pop ebx
xor ecx, esp
call fcn.00466e0a
add esp, 0x208
ret
Function at 0x40cd60
Capabilities:
Terminate process

Disassembly:
push esi
mov esi, dword [esp + 0xc]
push edi
mov edi, dword [esp + 0xc]
push 0
push esi
push edi
call fcn.0040c8c0
add esp, 0xc
test eax, eax
jg 0x40ce24
cmp byte [edi], 0
mov esi, dword [esi + 8]
push ebx
jne 0x40cdaa
mov eax, dword [esp + 0x18]
mov edi, dword [sym.imp.MSVCR90.dll___iob_func]
push eax
push str.No_option_given_to__s_n
call edi
mov ebx, dword [sym.imp.MSVCR90.dll_fprintf]
add eax, 0x40
push eax
call ebx
add esp, 0xc
jmp 0x40cdcc
mov ecx, dword [esp + 0x18]
push edi
mov edi, dword [sym.imp.MSVCR90.dll___iob_func]
push ecx
push str.Unknown_option_to__s:__s_n
call edi
mov ebx, dword [sym.imp.MSVCR90.dll_fprintf]
add eax, 0x40
push eax
call ebx
add esp, 0x10
mov edx, dword [esi]
push edx
push str.Alternatives_are:__s
call edi
add eax, 0x40
push eax
call ebx
mov eax, dword [esi + 4]
add esi, 4
add esp, 0xc
test eax, eax
je 0x40ce0b
lea esp, [esp]
push eax
push 0x486f7c
call edi
add eax, 0x40
push eax
call ebx
mov eax, dword [esi + 4]
add esi, 4
add esp, 0xc
test eax, eax
jne 0x40cdf0
push 0x4866cc
call edi
add eax, 0x40
push eax
call ebx
add esp, 8
push 1
call dword [sym.imp.MSVCR90.dll_exit]
pop ebx
pop edi
pop esi
ret

Function at 0x40ce60
Capabilities:
Terminate process

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
test esi, esi
jne 0x40ce6f
mov esi, 1
push esi
call dword [sym.imp.MSVCR90.dll_malloc]
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x40cec9
push edi
call dword [sym.imp.MSVCR90.dll__errno]
mov edi, eax
call fcn.004190c0
mov ecx, dword [edi]
mov dword [eax], ecx
mov eax, dword [esp + 0x14]
mov edi, eax
and edi, 8
je 0x40cea8
mov edx, dword [fcn.004203f0]
mov dword [fcn.004203f0], edx
test al, 0x18
je 0x40cebc
push esi
push 0x464
push 5
call fcn.00412af0
add esp, 0xc
test edi, edi
pop edi
je 0x40cedc
push 1
call dword [sym.imp.MSVCR90.dll_exit]
test byte [esp + 0x10], 0x20
je 0x40cedc
push esi
push 0
push ebx
call sub.MSVCR90.dll_memset
add esp, 0xc
pop esi
mov eax, ebx
pop ebx
ret

Function at 0x40d380
Capabilities:
Query environment variable

Disassembly:
push str.USER
call dword [sym.imp.MSVCR90.dll_getenv]
add esp, 4
test eax, eax
jne 0x40d397
mov eax, str.ODBC
push 0x30
push eax
mov eax, dword [esp + 0xc]
push eax
call fcn.00417ed0
add esp, 0xc
ret
Function at 0x411500
Capabilities:
Query environment variable

Disassembly:
push esi
push edi
xor edi, edi
cmp byte [0x786df4], 0
jne 0x4115cc
mov al, byte [0x786e01]
mov byte [0x786df4], 1
mov byte [0x786df5], al
call fcn.004132d0
test al, al
je 0x411535
pop edi
mov eax, 1
pop esi
ret 0xc
call fcn.00419a00
call fcn.004202a0
test eax, eax
jne 0x41152b
mov esi, dword [sym.imp.MSVCR90.dll_getenv]
cmp dword [0x786540], edi
jne 0x4115a0
push 0x4870fc
push str.mysql
mov dword [0x786540], 0xcea
call dword [sym.imp.WS2_32.dll_getservbyname]
test eax, eax
je 0x411583
movzx ecx, word [eax + 8]
push ecx
call dword [sym.imp.WS2_32.dll_ntohs]
movzx edx, ax
mov dword [0x786540], edx
push str.MYSQL_TCP_PORT
call esi
add esp, 4
test eax, eax
je 0x4115a0
push eax
call dword [sym.imp.MSVCR90.dll_atoi]
add esp, 4
mov dword [0x786540], eax
cmp dword [0x786544], edi
jne 0x4115d4
push str.MYSQL_UNIX_PORT
mov dword [0x786544], 0x486414
call esi
add esp, 4
test eax, eax
je 0x4115d4
mov dword [0x786544], eax
mov eax, edi
pop edi
pop esi
ret 0xc
call fcn.00419130
movsx edi, al
mov eax, edi
pop edi
pop esi
ret 0xc

Function at 0x413000
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0xa18
mov eax, dword [0x7079d0]
xor eax, esp
mov dword [esp + 0xa14], eax
lea eax, [esp + 8]
push eax
push 0x20019
push 0
push str.SOFTWAREMySQL
push getpeername
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x41311f
push esi
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
lea ecx, [esp + 0xc]
push ecx
lea edx, [esp + 0x11c]
push edx
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x1c]
xor esi, esi
push esi
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x2c]
push edx
push esi
push eax
mov dword [esp + 0x28], 0xff
mov dword [esp + 0x2c], 0x3ff
call edi
cmp eax, 0x103
je 0x413112
inc esi
cmp eax, 0xea
je 0x4130d1
test eax, eax
jne 0x413112
cmp dword [esp + 0x14], 1
jne 0x4130d1
push eax
lea ecx, [esp + 0x11c]
push ecx
push 0x4872e8
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x528]
push eax
call fcn.00412730
lea ecx, [esp + 0x52c]
push ecx
call dword [sym.imp.MSVCR90.dll__strdup]
push eax
call dword [sym.imp.MSVCR90.dll__putenv]
add esp, 0x1c
lea edx, [esp + 0xc]
push edx
lea eax, [esp + 0x11c]
push eax
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x1c]
push 0
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x2c]
push eax
push esi
push ecx
mov dword [esp + 0x28], 0xff
mov dword [esp + 0x2c], 0x3ff
call edi
cmp eax, 0x103
jne 0x413082
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
mov ecx, dword [esp + 0xa14]
xor ecx, esp
call fcn.00466e0a
add esp, 0xa18
ret
push 0x412f30
call dword [sym.imp.MSVCR90.dll__set_invalid_parameter_handler]
add esp, 4
call dword [sym.imp.MSVCR90.dll__tzset]
call fcn.00412f40
jmp 0x413000
Function at 0x413140
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0xa18
mov eax, dword [0x7079d0]
xor eax, esp
mov dword [esp + 0xa14], eax
lea eax, [esp + 8]
push eax
push 0x20019
push 0
push str.SOFTWAREMySQL
push getpeername
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x41311f
push esi
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
lea ecx, [esp + 0xc]
push ecx
lea edx, [esp + 0x11c]
push edx
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x1c]
xor esi, esi
push esi
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x2c]
push edx
push esi
push eax
mov dword [esp + 0x28], 0xff
mov dword [esp + 0x2c], 0x3ff
call edi
cmp eax, 0x103
je 0x413112
inc esi
cmp eax, 0xea
je 0x4130d1
test eax, eax
jne 0x413112
cmp dword [esp + 0x14], 1
jne 0x4130d1
push eax
lea ecx, [esp + 0x11c]
push ecx
push 0x4872e8
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x528]
push eax
call fcn.00412730
lea ecx, [esp + 0x52c]
push ecx
call dword [sym.imp.MSVCR90.dll__strdup]
push eax
call dword [sym.imp.MSVCR90.dll__putenv]
add esp, 0x1c
lea edx, [esp + 0xc]
push edx
lea eax, [esp + 0x11c]
push eax
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x1c]
push 0
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x2c]
push eax
push esi
push ecx
mov dword [esp + 0x28], 0xff
mov dword [esp + 0x2c], 0x3ff
call edi
cmp eax, 0x103
jne 0x413082
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
mov ecx, dword [esp + 0xa14]
xor ecx, esp
call fcn.00466e0a
add esp, 0xa18
ret
push 0x412f30
call dword [sym.imp.MSVCR90.dll__set_invalid_parameter_handler]
add esp, 4
call dword [sym.imp.MSVCR90.dll__tzset]
call fcn.00412f40
jmp 0x413000

Function at 0x413160
Capabilities:
Query environment variable

Disassembly:
push ecx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea eax, [esp + 4]
push eax
push 0x20019
push 0
push str.SYSTEMCurrentControlSetServicesTcpipParameters
push getpeername
call esi
test eax, eax
je 0x4131dc
lea ecx, [esp + 4]
push ecx
push 0x20019
push 0
push str.SYSTEMCurrentControlSetServicesWinsock2Parameters
push getpeername
call esi
test eax, eax
je 0x4131dc
lea edx, [esp + 4]
push edx
push 0x20019
push 0
push str.SYSTEMCurrentControlSetServicesWinsockParameters
push getpeername
call esi
test eax, eax
je 0x4131dc
push str.HAVE_TCPIP
call dword [sym.imp.MSVCR90.dll_getenv]
add esp, 4
test eax, eax
je 0x4131d7
cmp byte [0x786e00], 0
je 0x4131dc
xor al, al
pop esi
pop ecx
ret
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, 1
pop esi
pop ecx
ret