joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4079d0
Capabilities:
Get hostname

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4134ab
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x2914
call fcn.0040a780
mov eax, dword [0x41c08c]
push ebx
mov ebx, dword [ebp + 8]
mov dword [esp + 0x2914], eax
mov eax, dword [ebp + 0x10]
push esi
mov esi, ecx
mov ecx, dword [ebp + 0x14]
mov dword [esp + 0xc], eax
mov eax, dword [esi + 0x408]
test eax, eax
push edi
mov edi, dword [ebp + 0xc]
mov dword [esp + 0xc], edi
mov dword [esp + 0x14], ecx
jne 0x407bde
test ebx, ebx
je 0x407a43
lea edx, [esi + 0x204]
push ebx
push edx
call fcn.00409eb8
add esp, 8
test edi, edi
je 0x407a57
lea eax, [esi + 0x104]
push edi
push eax
call fcn.00409eb8
add esp, 8
mov eax, dword [esp + 0x10]
test eax, eax
je 0x407a6c
push eax
lea ecx, [esi + 4]
push ecx
call fcn.00409eb8
add esp, 8
mov eax, dword [esp + 0x14]
test eax, eax
je 0x407a84
push eax
lea edx, [esi + 0x304]
push edx
call fcn.00409eb8
add esp, 8
push 0x190
call fcn.00409ed9
mov edi, eax
add esp, 4
test edi, edi
je 0x407be3
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x2900]
push ecx
mov dword [esp + 0x20], 0x10
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
test eax, eax
jne 0x407acf
lea edx, [esp + 0x28fc]
push str.UNKNOWN
push edx
call fcn.00409eb8
add esp, 8
test ebx, ebx
jne 0x407ae2
mov eax, dword [esp + 0xc]
test eax, eax
jne 0x407ae2
mov eax, 1
jmp 0x407ae4
xor eax, eax
test eax, eax
mov dword [esi + 0x40c], eax
je 0x407b27
mov eax, dword [esi]
push 1
push 0x4b3
push eax
call sub.ODBC32.dll_SQLSetConnectOptionW
lea ecx, [esp + 0x28fc]
push ecx
lea edx, [esi + 0x304]
push edx
mov word [esi + 0x404], ax
lea eax, [esi + 4]
push eax
push str.driverSQL_Server_server_s_database_s_APPDBCHECK_WSID_s
push edi
call fcn.0040a126
add esp, 0x14
jmp 0x407b56
lea ecx, [esp + 0x28fc]
push ecx
lea edx, [esi + 0x304]
push edx
lea eax, [esi + 4]
push eax
lea ecx, [esi + 0x104]
push ecx
lea edx, [esi + 0x204]
push edx
push str.driverSQL_Server_UID_s_PWD_s_server_s_database_s_APPDBCHECK_WSID_s
push edi
call fcn.0040a126
add esp, 0x1c
push edi
push 0x418970
call fcn.004060c0
mov eax, dword [esi]
add esp, 8
push 0
push 0
push 0
push 0
push 0xfffffffffffffffd
push edi
push 0
push eax
call sub.ODBC32.dll_SQLDriverConnectW
push edi
mov word [esi + 0x404], ax
call fcn.00409f07
mov ax, word [esi + 0x404]
add esp, 4
cmp ax, 1
je 0x407bd4
test ax, ax
je 0x407bd4
push esi
push 2
lea ecx, [esp + 0x24]
call fcn.004068a0
mov esi, eax
mov ecx, 0x51c
lea edi, [esp + 0x148c]
rep movsd dword es:[edi], dword [esi]
push 0x41a2b0
lea ecx, [esp + 0x1490]
push ecx
mov dword [esp + 0x2934], 0
call fcn.0040a733
mov dword [esi + 0x408], 1
mov eax, 1
mov ecx, dword [esp + 0x2924]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x291c]
call fcn.0040a62a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
Function at 0x40b1fd
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.0040a780
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40b298
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x41c7ec]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x40b298
cmp eax, 1
je 0x40b2b9
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40b298
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x40b265
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x40b294
xor eax, eax
inc eax
jmp 0x40b2d8
cmp edi, eax
jae 0x40b29c
xor eax, eax
jmp 0x40b2d8
cmp eax, esi
jae 0x40b2a3
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x41c7ec]
jmp 0x40b2bc
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40d3b9
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x41c82c], esi
push edi
jne 0x40d3d9
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
cmp dword [ebp + 0xc], 0
mov al, byte [ebp + 0x10]
mov dword [0x41c828], esi
mov byte [0x41c824], al
jne 0x40d43f
mov ecx, dword [0x41cd50]
test ecx, ecx
je 0x40d420
mov eax, dword [0x41cd4c]
sub eax, 4
cmp eax, ecx
jmp 0x40d419
mov eax, dword [eax]
test eax, eax
je 0x40d40b
call eax
mov eax, dword [0x41cd4c]
sub eax, 4
cmp eax, dword [0x41cd50]
mov dword [0x41cd4c], eax
jae 0x40d403
mov eax, 0x41c024
mov esi, 0x41c02c
cmp eax, esi
mov edi, eax
jae 0x40d43f
mov eax, dword [edi]
test eax, eax
je 0x40d438
call eax
add edi, 4
cmp edi, esi
jb 0x40d430
mov eax, 0x41c030
mov esi, 0x41c038
cmp eax, esi
mov edi, eax
jae 0x40d45e
mov eax, dword [edi]
test eax, eax
je 0x40d457
call eax
add edi, 4
cmp edi, esi
jb 0x40d44f
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x40d478
push dword [ebp + 8]
mov dword [0x41c82c], 1
call fcn.0040d2d5
pop ebp
ret
Function at 0x40d89f
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, dword [ebp + 8]
cmp esi, dword [0x41cd5c]
push edi
jae 0x40da74
mov eax, esi
sar eax, 5
lea edi, [eax*4 + 0x41cd60]
mov eax, dword [edi]
and esi, 0x1f
shl esi, 3
add eax, esi
mov dl, byte [eax + 4]
test dl, 1
je 0x40da74
and dword [ebp - 0xc], 0
cmp dword [ebp + 0x10], 0
mov ebx, dword [ebp + 0xc]
mov ecx, ebx
je 0x40d94a
test dl, 2
jne 0x40d94a
test dl, 0x48
je 0x40d914
cmp byte [eax + 5], 0xa
je 0x40d914
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea ecx, [ebx + 1]
mov dword [ebp - 0xc], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push ecx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40d95d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop ecx
cmp eax, ecx
jne 0x40d945
mov dword [0x41c7e4], ecx
jmp 0x40da7b
cmp eax, 0x6d
jne 0x40d951
xor eax, eax
jmp 0x40da88
push eax
call fcn.00411271
pop ecx
jmp 0x40da85
mov eax, dword [ebp - 0x10]
mov ecx, dword [edi]
add dword [ebp - 0xc], eax
test byte [ecx + esi + 4], 0x80
je 0x40da6f
test eax, eax
je 0x40d984
cmp byte [ebx], 0xa
jne 0x40d984
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x40d98d
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0xc]
add ecx, eax
cmp eax, ecx
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], ecx
jae 0x40da69
mov eax, dword [ebp - 8]
mov al, byte [eax]
cmp al, 0x1a
je 0x40da59
cmp al, 0xd
je 0x40d9bf
mov byte [ebx], al
inc ebx
inc dword [ebp - 8]
jmp 0x40da4b
dec ecx
cmp dword [ebp - 8], ecx
jae 0x40d9d9
mov eax, dword [ebp - 8]
inc eax
cmp byte [eax], 0xa
jne 0x40d9d4
add dword [ebp - 8], 2
jmp 0x40da2d
mov dword [ebp - 8], eax
jmp 0x40da47
inc dword [ebp - 8]
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40da01
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40da47
cmp dword [ebp - 0x10], 0
je 0x40da47
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x40da22
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x40da2d
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x40da4a
cmp ebx, dword [ebp + 0xc]
jne 0x40da32
cmp byte [ebp - 1], 0xa
jne 0x40da32
mov byte [ebx], 0xa
jmp 0x40da4a
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0041030a
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x40da4b
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 0xc]
cmp dword [ebp - 8], ecx
jb 0x40d9a3
jmp 0x40da69
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x40da69
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 0xc], ebx
mov eax, dword [ebp - 0xc]
jmp 0x40da88
and dword [0x41c7e4], 0
mov dword [0x41c7e0], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40e361
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x90]
sub esp, 0x110
mov eax, dword [0x41c08c]
mov ecx, dword [ebp + 0x98]
push ebx
push esi
mov dword [ebp + 0x8c], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x41c368]
je 0x40e396
inc eax
cmp eax, 0x13
jb 0x40e387
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x41c368]
jne 0x40e4b9
mov eax, dword [0x41c794]
cmp eax, 1
je 0x40e494
cmp eax, edx
jne 0x40e3c6
cmp dword [0x41c334], 1
je 0x40e494
cmp ecx, 0xfc
je 0x40e4b9
push 0x104
lea eax, [ebp - 0x7c]
push eax
push edx
mov byte [ebp + 0x88], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40e3fc
lea eax, [ebp - 0x7c]
push str._program_name_unknown_
push eax
call fcn.00410d60
pop ecx
pop ecx
lea edi, [ebp - 0x7c]
mov eax, edi
push eax
call fcn.00410680
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x40e430
mov eax, edi
push eax
call fcn.00410680
mov edi, eax
lea eax, [ebp - 0x7c]
sub eax, 0x3b
push 3
add edi, eax
push 0x419084
push edi
call fcn.0040fd90
add esp, 0x10
push edi
call fcn.00410680
push dword [esi + 0x41c36c]
mov ebx, eax
call fcn.00410680
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.0040a780
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00410d60
push edi
push ebx
call fcn.00410d70
push 0x419080
push ebx
call fcn.00410d70
push dword [esi + 0x41c36c]
push ebx
call fcn.00410d70
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00410c5f
add esp, 0x2c
jmp 0x40e4b9
push edx
lea eax, [ebp - 0x80]
push eax
lea esi, [esi + 0x41c36c]
push dword [esi]
call fcn.00410680
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x8c]
call fcn.0040a62a
pop edi
pop esi
pop ebx
add ebp, 0x90
leave
ret
Function at 0x40e9f1
Capabilities:
Query environment variable

Disassembly:
push ecx
push ecx
mov eax, dword [0x41ca44]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
push esi
push edi
xor ebx, ebx
xor esi, esi
xor edi, edi
cmp eax, ebx
jne 0x40ea3a
call ebp
mov esi, eax
cmp esi, ebx
je 0x40ea20
mov dword [0x41ca44], 1
jmp 0x40ea3f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x40ea35
push 2
pop eax
mov dword [0x41ca44], eax
jmp 0x40ea3a
mov eax, dword [0x41ca44]
cmp eax, 1
jne 0x40ea97
cmp esi, ebx
jne 0x40ea52
call ebp
mov esi, eax
cmp esi, ebx
jne 0x40ea52
xor eax, eax
jmp 0x40eb3e
cmp word [esi], bx
mov eax, esi
je 0x40ea67
inc eax
inc eax
cmp word [eax], bx
jne 0x40ea59
inc eax
inc eax
cmp word [eax], bx
jne 0x40ea59
sub eax, esi
inc eax
inc eax
mov ebp, eax
push ebp
call fcn.0040b117
mov edi, eax
cmp edi, ebx
pop ecx
jne 0x40ea8a
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
jmp 0x40eb3e
push ebp
push esi
push edi
call fcn.00411340
add esp, 0xc
jmp 0x40ea7c
cmp eax, 2
je 0x40eaa0
cmp eax, ebx
jne 0x40ea4b
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebp, eax
cmp ebp, ebx
je 0x40ea4b
cmp byte [ebp], bl
mov esi, ebp
je 0x40ead6
push ebx
push ebx
push 0xffffffffffffffff
push esi
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp eax, ebx
je 0x40ea4b
push esi
add edi, eax
call fcn.00410680
lea esi, [esi + eax + 1]
cmp byte [esi], bl
pop ecx
jne 0x40eab3
inc edi
lea eax, [edi + edi]
push eax
mov dword [esp + 0x18], edi
call fcn.0040b117
cmp eax, ebx
pop ecx
mov dword [esp + 0x10], eax
je 0x40eb4f
cmp byte [ebp], bl
mov edi, ebp
mov esi, eax
je 0x40eb30
mov ecx, dword [esp + 0x14]
mov eax, esi
sub eax, dword [esp + 0x10]
sar eax, 1
sub ecx, eax
push ecx
push esi
push 0xffffffffffffffff
push edi
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x40eb45
push edi
call fcn.00410680
push esi
lea edi, [edi + eax + 1]
call fcn.00409eec
cmp byte [edi], bl
pop ecx
pop ecx
lea esi, [esi + eax*2 + 2]
jne 0x40eaf6
push ebp
mov word [esi], bx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret
push dword [esp + 0x10]
call fcn.0040b12e
pop ecx
push ebp
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
jmp 0x40ea4b
Function at 0x40eb60
Capabilities:
Accept command line arguments

Disassembly:
mov eax, dword [0x41ca48]
push ebp
xor ebp, ebp
cmp eax, ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetCommandLineW]
jne 0x40eba0
call esi
test eax, eax
je 0x40eb85
mov dword [0x41ca48], 1
jmp 0x40eba5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x40eb9c
mov dword [0x41ca48], 2
jmp 0x40ebae
xor eax, eax
jmp 0x40ebfc
cmp eax, 1
jne 0x40eba9
call esi
jmp 0x40ebfc
cmp eax, 2
jne 0x40eb9c
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov edi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push ebp
push ebp
push 0xffffffffffffffff
mov ebx, eax
push ebx
push 1
push ebp
call edi
mov esi, eax
cmp esi, ebp
je 0x40ebf4
lea eax, [esi + esi]
push eax
call fcn.0040b117
mov ebp, eax
test ebp, ebp
pop ecx
je 0x40ebf4
push esi
push ebp
push 0xffffffffffffffff
push ebx
push 1
push 0
call edi
test eax, eax
jne 0x40ebf8
push ebp
call fcn.0040b12e
pop ecx
xor eax, eax
jmp 0x40ebfa
mov eax, ebp
pop edi
pop ebx
pop esi
pop ebp
ret
Function at 0x4100dc
Capabilities:
Parse pe header

Disassembly:
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 0x41010a
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x410111
cmp ebx, dword [eax + 4]
jae 0x410111
xor eax, eax
jmp 0x410301
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x410122
xor eax, eax
inc eax
jmp 0x410300
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x410138
cmp ecx, edx
jae 0x41027d
cmp dword [eax + 4], 0
je 0x410141
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x410129
cmp dword [ebp + 8], 0
je 0x410163
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x41027d
cmp eax, esi
jae 0x41027d
mov eax, dword [0x41ca58]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x410188
cmp dword [esi*4 + 0x41ca60], edi
je 0x410281
inc esi
cmp esi, eax
jl 0x410176
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4102fd
cmp dword [ebp - 8], 0x1000000
jne 0x4102fd
test byte [ebp - 0xc], 0xcc
je 0x410206
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x4102fd
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x4102fd
cmp word [eax + 0x18], 0x10b
jne 0x4102fd
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x4102fd
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x410206
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x410206
test byte [ecx + 0x27], 0x80
jne 0x41027d
push 1
push 0x41caa0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x41011a
mov ecx, dword [0x41ca58]
test ecx, ecx
mov edx, ecx
jle 0x41023a
lea eax, [ecx*4 + 0x41ca5c]
cmp dword [eax], edi
je 0x41023a
dec edx
sub eax, 4
test edx, edx
jg 0x41022e
test edx, edx
jne 0x41026b
push 0xf
pop ebx
cmp ecx, ebx
jg 0x410247
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x41025f
lea eax, [edx*4 + 0x41ca60]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x41024d
cmp ecx, 0x10
jge 0x41026b
inc ecx
mov dword [0x41ca58], ecx
push 0
push 0x41caa0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x41011a
xor eax, eax
jmp 0x410300
test esi, esi
jle 0x41011a
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x41caa0
call ebx
test eax, eax
jne 0x41011a
cmp dword [esi*4 + 0x41ca60], edi
je 0x4102d7
mov eax, dword [0x41ca58]
lea esi, [eax - 1]
test esi, esi
jl 0x4102c5
cmp dword [esi*4 + 0x41ca60], edi
je 0x4102c1
dec esi
jns 0x4102b5
test esi, esi
jge 0x4102d5
cmp eax, 0x10
jge 0x4102d0
inc eax
mov dword [0x41ca58], eax
lea esi, [eax - 1]
jmp 0x4102d7
je 0x4102ef
xor ecx, ecx
test esi, esi
jl 0x4102ef
lea eax, [ecx*4 + 0x41ca60]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x4102dd
push 0
push 0x41caa0
call ebx
jmp 0x41011a
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x41039b
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a4]
sub esp, 0x424
mov ecx, dword [ebp + 0x3ac]
cmp ecx, dword [0x41cd5c]
mov eax, dword [0x41c08c]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x3b0]
mov dword [ebp + 0x3a0], eax
mov dword [ebp - 0x78], edi
jae 0x41053b
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x41cd60]
mov eax, dword [ebx]
mov esi, ecx
and esi, 0x1f
shl esi, 3
mov al, byte [eax + esi + 4]
test al, 1
mov dword [ebp - 0x80], ebx
je 0x41053b
and dword [ebp - 0x70], 0
and dword [ebp - 0x7c], 0
cmp dword [ebp + 0x3b4], 0
jne 0x41040f
xor eax, eax
jmp 0x41054f
test al, 0x20
je 0x410422
push 2
push 0
push 0
push ecx
call fcn.004119e7
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x4104b7
and dword [ebp - 0x68], 0
cmp dword [ebp + 0x3b4], 0
mov dword [ebp - 0x6c], edi
jbe 0x410518
mov ecx, dword [ebp - 0x6c]
xor edi, edi
sub ecx, dword [ebp - 0x78]
lea eax, [ebp - 0x64]
cmp ecx, dword [ebp + 0x3b4]
jae 0x41047c
mov edx, dword [ebp - 0x6c]
inc dword [ebp - 0x6c]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x41046d
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc edi
mov ebx, dword [ebp - 0x80]
mov byte [eax], dl
inc eax
inc edi
cmp edi, 0x400
jl 0x41044f
mov edi, eax
lea eax, [ebp - 0x64]
sub edi, eax
push 0
lea eax, [ebp - 0x74]
push eax
push edi
lea eax, [ebp - 0x64]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4104dc
mov eax, dword [ebp - 0x74]
add dword [ebp - 0x70], eax
cmp eax, edi
jl 0x4104e5
mov eax, dword [ebp - 0x6c]
sub eax, dword [ebp - 0x78]
cmp eax, dword [ebp + 0x3b4]
jb 0x410444
jmp 0x4104e5
push 0
lea ecx, [ebp - 0x74]
push ecx
push dword [ebp + 0x3b4]
push edi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4104dc
mov eax, dword [ebp - 0x74]
and dword [ebp - 0x68], 0
mov dword [ebp - 0x70], eax
jmp 0x4104e5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x70]
test eax, eax
jne 0x410536
cmp dword [ebp - 0x68], eax
je 0x410515
push 5
pop eax
cmp dword [ebp - 0x68], eax
jne 0x41050a
mov dword [0x41c7e0], 9
mov dword [0x41c7e4], eax
jmp 0x41054c
push dword [ebp - 0x68]
call fcn.00411271
pop ecx
jmp 0x41054c
mov edi, dword [ebp - 0x78]
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x41052a
cmp byte [edi], 0x1a
je 0x410408
mov dword [0x41c7e0], 0x1c
jmp 0x410545
sub eax, dword [ebp - 0x7c]
jmp 0x41054f
mov dword [0x41c7e0], 9
and dword [0x41c7e4], 0
or eax, 0xffffffff
mov ecx, dword [ebp + 0x3a0]
pop edi
pop esi
pop ebx
call fcn.0040a62a
add ebp, 0x3a4
leave
ret
Function at 0x410c5f
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x41caa4], ebx
push esi
push edi
jne 0x410cdf
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x410d1a
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x41caa4], eax
je 0x410d1a
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x41caa8], eax
call esi
cmp dword [0x41c7ec], 2
mov dword [0x41caac], eax
jne 0x410cdf
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x41cab4], eax
je 0x410cdf
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x41cab0], eax
mov eax, dword [0x41cab0]
test eax, eax
je 0x410d24
call eax
test eax, eax
je 0x410d0b
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x41cab4]
test eax, eax
je 0x410d0b
test byte [ebp - 8], 1
jne 0x410d24
cmp dword [0x41c7f8], 4
jb 0x410d1e
or byte [ebp + 0x12], 0x20
jmp 0x410d43
xor eax, eax
jmp 0x410d53
or byte [ebp + 0x12], 4
jmp 0x410d43
mov eax, dword [0x41caa8]
test eax, eax
je 0x410d43
call eax
mov ebx, eax
test ebx, ebx
je 0x410d43
mov eax, dword [0x41caac]
test eax, eax
je 0x410d43
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x41caa4]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x10001670
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1004716a
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x10060214]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x28], esi
mov edi, dword [ebp + 8]
push 0
mov dword [ebp - 0x2c], esi
call fcn.10021c0e
mov dword [ebp - 4], 0
mov dword [esi + 4], 0
mov byte [esi + 8], 0
mov dword [esi + 0xc], 0
mov byte [esi + 0x10], 0
xor eax, eax
mov dword [esi + 0x14], 0
mov word [esi + 0x18], ax
mov dword [esi + 0x1c], eax
mov word [esi + 0x20], ax
mov dword [esi + 0x24], eax
mov byte [esi + 0x28], al
mov dword [esi + 0x2c], eax
mov byte [esi + 0x30], al
mov byte [ebp - 4], 6
test edi, edi
jne 0x10001730
lea eax, [ebp - 0x20]
mov dword [ebp - 0x24], vtable.std::exception.0
push eax
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], str.bad_locale_name
xorps xmm0, xmm0
mov byte [ebp - 0x14], 1
push eax
movq qword [ebp - 0x20], xmm0
call fcn.100252cc
add esp, 8
mov dword [ebp - 0x24], vtable.std::runtime_error.0
lea eax, [ebp - 0x24]
push 0x1005e990
push eax
call fcn.10025e91
push edi
push esi
call fcn.10021f56
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10022ebc
mov esp, ebp
pop ebp
ret 4