joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4544f0
Capabilities:
Get keyboard layout
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffda0
push ebx
xor edx, edx
mov dword [ebp - 0x260], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x45469b
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
cmp dword [eax + 0x34], 0
jne 0x45467c
mov dl, 1
mov eax, dword [0x415ea8]
call fcn.00403718
mov edx, dword [ebp - 4]
mov dword [edx + 0x34], eax
mov eax, dword [ebp - 4]
add eax, 0x38
call fcn.004044d4
lea eax, [ebp - 0x114]
push eax
push 0x40
call sub.user32.dll_GetKeyboardLayoutList
dec eax
test eax, eax
jl 0x45466b
inc eax
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x114]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
call fcn.00442388
test al, al
je 0x45465e
lea eax, [ebp - 0xc]
push eax
push 0x20019
push 0
push 0
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
mov dword [ebp - 0x25c], eax
mov byte [ebp - 0x258], 0
lea ecx, [ebp - 0x25c]
mov edx, 0x4546ac
lea eax, [ebp - 0x254]
call fcn.00409638
push eax
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA_1
test eax, eax
jne 0x45465e
xor eax, eax
push ebp
push 0x454657
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 8], pe_nt_image_headers32
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x214]
push eax
push 0
push 0
push 0x4546e4
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegQueryValueExA_1
test eax, eax
jne 0x454640
lea eax, [ebp - 0x260]
lea edx, [ebp - 0x214]
mov ecx, pe_nt_image_headers32
call fcn.00404744
mov edx, dword [ebp - 0x260]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
mov ebx, dword [eax]
call dword [ebx + 0x3c]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x3c]
jne 0x454640
mov eax, dword [ebp - 4]
add eax, 0x38
lea edx, [ebp - 0x214]
mov ecx, pe_nt_image_headers32
call fcn.00404744
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x45465e
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegCloseKey_1
ret
add dword [ebp - 0x14], 4
dec dword [ebp - 0x10]
jne 0x454561
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
mov byte [eax + 0x1d], 0
mov dl, 1
call fcn.00419d48
mov eax, dword [ebp - 4]
mov ebx, dword [eax + 0x34]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4546a2
lea eax, [ebp - 0x260]
call fcn.004044d4
ret

Function at 0x454fe4
Capabilities:
Create thread
Set global application hook

Disassembly:
push ecx
mov eax, dword [0x463b74]
cmp byte [eax + 0xa5], 0
jne 0x455055
cmp dword [0x463b8c], 0
jne 0x455016
call sub.kernel32.dll_GetCurrentThreadId_1
push eax
push 0
mov eax, 0x454fa0
push eax
push 3
call sub.user32.dll_SetWindowsHookExA
mov dword [0x463b8c], eax
cmp dword [0x463b88], 0
jne 0x455031
push 0
push 0
push 0
push 0
call sub.kernel32.dll_CreateEventA
mov dword [0x463b88], eax
cmp dword [0x463b90], 0
jne 0x455055
push esp
push 0
push 0
push 0x454f44
push 0x3e8
push 0
call sub.kernel32.dll_CreateThread
mov dword [0x463b90], eax
pop edx
ret
Function at 0x4556e8
Capabilities:
Enumerate gui resources

Disassembly:
push ebx
push esi
add esp, 0xfffffff8
mov ebx, eax
mov eax, dword [0x463b74]
cmp dword [eax + 0x30], 0
je 0x455792
cmp dword [ebx + 0x94], 0
jne 0x45578c
mov eax, dword [ebx + 0x30]
mov dword [esp], eax
mov byte [esp + 4], dl
mov eax, esp
push eax
push 0x455678
call sub.user32.dll_EnumWindows
mov eax, dword [ebx + 0x90]
cmp dword [eax + 8], 0
je 0x45578c
push 3
mov eax, dword [esp + 4]
push eax
call sub.user32.dll_GetWindow
mov esi, eax
mov dword [esp], esi
push 0xffffffffffffffec
push esi
call sub.user32.dll_GetWindowLongA
test al, 8
je 0x455752
mov dword [esp], 0xfffffffe
mov eax, dword [ebx + 0x90]
mov esi, dword [eax + 8]
dec esi
cmp esi, 0
jl 0x45578c
push 0x213
push 0
push 0
push 0
push 0
mov eax, dword [esp + 0x14]
push eax
mov edx, esi
mov eax, dword [ebx + 0x90]
call fcn.00417e08
push eax
call sub.user32.dll_SetWindowPos
dec esi
cmp esi, 0xffffffff
jne 0x455761
inc dword [ebx + 0x94]
pop ecx
pop edx
pop esi
pop ebx
ret

Function at 0x4562f0
Capabilities:
Get graphical window text

Disassembly:
push ebx
push esi
add esp, 0xffffff00
mov esi, edx
mov ebx, eax
cmp byte [ebx + 0xa4], 0
je 0x456325
push pe_nt_image_headers32
lea eax, [esp + 4]
push eax
mov eax, dword [ebx + 0x30]
push eax
call sub.user32.dll_GetWindowTextA
mov ecx, eax
mov edx, esp
mov eax, esi
call fcn.004045c4
jmp 0x456332
mov eax, esi
mov edx, dword [ebx + 0x8c]
call fcn.00404528
add esp, 0x100
pop esi
pop ebx
ret

Function at 0x4574e4
Capabilities:
Hide graphical window

Disassembly:
push ebx
push esi
mov ebx, eax
mov esi, dword [ebx + 0x84]
test esi, esi
je 0x457525
mov eax, esi
call fcn.0043d9b4
test al, al
je 0x457525
mov eax, dword [ebx + 0x84]
call fcn.0043d6b0
push eax
call sub.user32.dll_IsWindowVisible
test eax, eax
je 0x457525
push 0
mov eax, dword [ebx + 0x84]
call fcn.0043d6b0
push eax
call sub.user32.dll_ShowWindow
pop esi
pop ebx
ret
Function at 0x4582f0
Capabilities:
Get hostname

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x48], ebx
mov edi, ecx
mov esi, edx
mov ebx, eax
lea eax, [ebp - 0x10]
mov edx, dword [0x41503c]
call fcn.00404eb8
xor eax, eax
push ebp
push 0x458434
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [0x461d48], 0
jne 0x458343
mov ecx, dword [0x461e74]
mov dl, 1
mov eax, dword [0x4077c0]
call fcn.0040c09c
call fcn.00403ee8
lea eax, [ebp - 0x20]
xor ecx, ecx
mov edx, 0x10
call fcn.0040313c
mov eax, ebx
call fcn.00404d3c
mov dword [ebp - 0x1c], eax
push esi
push edi
mov esi, 0x458444
lea edi, [ebp - 0x30]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
pop edi
pop esi
lea eax, [ebp - 0x30]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0xc]
call fcn.00405ef8
xor eax, eax
mov dword [ebp - 8], eax
mov eax, ebx
call fcn.00404d4c
test eax, eax
jle 0x4583db
mov dword [ebp - 4], 0x10
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x40]
push eax
call sub.kernel32.dll_GetComputerNameA
test eax, eax
je 0x4583d4
lea eax, [ebp - 0x44]
mov edx, ebx
call fcn.0040475c
mov eax, dword [ebp - 0x44]
push eax
lea eax, [ebp - 0x48]
lea edx, [ebp - 0x40]
mov ecx, 0x10
call fcn.00404744
mov eax, dword [ebp - 0x48]
pop edx
call fcn.00408638
test eax, eax
jne 0x4583d4
mov ebx, 0x15
jmp 0x4583e0
mov ebx, 0x10
jmp 0x4583e0
mov ebx, 0x15
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 0x20]
push eax
push ebx
push 0
push esi
call dword [0x461d48]
call fcn.00458168
mov eax, dword [ebp - 8]
call fcn.00458168
mov eax, edi
mov edx, dword [ebp - 0xc]
call fcn.00405f10
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x45843b
lea eax, [ebp - 0x48]
mov edx, 2
call fcn.004044f8
lea eax, [ebp - 0x10]
mov edx, dword [0x41503c]
call fcn.00404f88
ret
Function at 0x4013cd
Capabilities:
Parse pe header
Terminate process

Disassembly:
push 0x18
push 0x406278
call fcn.00402110
mov edi, 0x94
mov eax, edi
call fcn.00402ea0
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x4085dc], ecx
mov eax, dword [esi + 4]
mov dword [0x4085e8], eax
mov edx, dword [esi + 8]
mov dword [0x4085ec], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x4085e0], esi
cmp ecx, 2
je 0x40142d
or esi, 0x8000
mov dword [0x4085e0], esi
shl eax, 8
add eax, edx
mov dword [0x4085e4], eax
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp word [eax], 0x5a4d
jne 0x401466
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x401466
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x40147e
cmp eax, 0x20b
je 0x40146b
mov dword [ebp - 0x1c], edi
jmp 0x401492
cmp dword [ecx + 0x84], 0xe
jbe 0x401466
xor eax, eax
cmp dword [ecx + 0xf8], edi
jmp 0x40148c
cmp dword [ecx + 0x74], 0xe
jbe 0x401466
xor eax, eax
cmp dword [ecx + 0xe8], edi
setne al
mov dword [ebp - 0x1c], eax
push edi
call fcn.00402e40
pop ecx
test eax, eax
jne 0x4014be
cmp dword [0x4085c8], 2
je 0x4014ab
call fcn.00402577
push 0x1c
call fcn.00402400
push 0xff
call fcn.00402265
pop ecx
pop ecx
call fcn.00402d9e
mov dword [ebp - 4], edi
call fcn.00402bf3
test eax, eax
jge 0x4014d7
push 0x1b
call fcn.004013a8
pop ecx
call fcn.00402b54
mov dword [0x409a30], eax
call fcn.004029ea
mov dword [0x4085c4], eax
call fcn.00402954
test eax, eax
jge 0x4014fc
push 8
call fcn.004013a8
pop ecx
call fcn.00402721
test eax, eax
jge 0x40150d
push 9
call fcn.004013a8
pop ecx
push 1
call fcn.00402295
pop ecx
mov dword [ebp - 0x24], eax
cmp eax, edi
je 0x401523
push eax
call fcn.004013a8
pop ecx
mov eax, dword [0x408604]
mov dword [0x408608], eax
push eax
push dword [0x4085f8]
push dword [0x4085f0]
call section..text
add esp, 0xc
mov esi, eax
mov dword [ebp - 0x28], esi
cmp dword [ebp - 0x1c], edi
jne 0x401552
push esi
call fcn.004023c0
call fcn.004023e2
jmp 0x401584
or dword [ebp - 4], 0xffffffff
mov eax, esi
lea esp, [ebp - 0x34]
call fcn.0040214b
ret
Function at 0x4022ff
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x40861c], esi
push edi
jne 0x40231f
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 [0x408618], esi
mov byte [0x408614], al
jne 0x402385
mov ecx, dword [0x409a28]
test ecx, ecx
je 0x402366
mov eax, dword [0x409a24]
sub eax, 4
cmp eax, ecx
jmp 0x40235f
mov eax, dword [eax]
test eax, eax
je 0x402351
call eax
mov eax, dword [0x409a24]
sub eax, 4
cmp eax, dword [0x409a28]
mov dword [0x409a24], eax
jae 0x402349
mov eax, 0x40801c
mov esi, 0x408024
cmp eax, esi
mov edi, eax
jae 0x402385
mov eax, dword [edi]
test eax, eax
je 0x40237e
call eax
add edi, 4
cmp edi, esi
jb 0x402376
mov eax, 0x408028
mov esi, 0x40802c
cmp eax, esi
mov edi, eax
jae 0x4023a4
mov eax, dword [edi]
test eax, eax
je 0x40239d
call eax
add edi, 4
cmp edi, esi
jb 0x402395
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x4023be
push dword [ebp + 8]
mov dword [0x40861c], 1
call fcn.00402265
pop ebp
ret

Function at 0x402400
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x408030]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x408040]
je 0x402435
inc eax
cmp eax, 0x13
jb 0x402426
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x408040]
jne 0x40255b
mov eax, dword [0x4085c8]
cmp eax, 1
je 0x402533
cmp eax, edx
jne 0x402465
cmp dword [0x408038], 1
je 0x402533
cmp ecx, 0xfc
je 0x40255b
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40249b
lea eax, [ebp - 0x80]
push 0x4062c0
push eax
call fcn.00403700
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00403390
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x4024cf
mov eax, edi
push eax
call fcn.00403390
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x4062bc
push edi
call fcn.00403800
add esp, 0x10
push edi
call fcn.00403390
push dword [esi + 0x408044]
mov ebx, eax
call fcn.00403390
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00402ea0
mov ebx, esp
push 0x406840
push ebx
call fcn.00403700
push edi
push ebx
call fcn.00403710
push 0x4062b8
push ebx
call fcn.00403710
push dword [esi + 0x408044]
push ebx
call fcn.00403710
push 0x12010
push 0x406284
push ebx
call fcn.00403605
add esp, 0x2c
jmp 0x40255b
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x408044]
push dword [esi]
call fcn.00403390
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 + 0x88]
call fcn.0040139a
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x4029ea
Capabilities:
Query environment variable

Disassembly:
push ecx
push ecx
mov eax, dword [0x408834]
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 0x402a33
call ebp
mov esi, eax
cmp esi, ebx
je 0x402a19
mov dword [0x408834], 1
jmp 0x402a38
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x402a2e
push 2
pop eax
mov dword [0x408834], eax
jmp 0x402a33
mov eax, dword [0x408834]
cmp eax, 1
jne 0x402a90
cmp esi, ebx
jne 0x402a4b
call ebp
mov esi, eax
cmp esi, ebx
jne 0x402a4b
xor eax, eax
jmp 0x402b37
cmp word [esi], bx
mov eax, esi
je 0x402a60
inc eax
inc eax
cmp word [eax], bx
jne 0x402a52
inc eax
inc eax
cmp word [eax], bx
jne 0x402a52
sub eax, esi
inc eax
inc eax
mov ebp, eax
push ebp
call fcn.0040348d
mov edi, eax
cmp edi, ebx
pop ecx
jne 0x402a83
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
jmp 0x402b37
push ebp
push esi
push edi
call fcn.00403d00
add esp, 0xc
jmp 0x402a75
cmp eax, 2
je 0x402a99
cmp eax, ebx
jne 0x402a44
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebp, eax
cmp ebp, ebx
je 0x402a44
cmp byte [ebp], bl
mov esi, ebp
je 0x402acf
push ebx
push ebx
push 0xffffffffffffffff
push esi
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp eax, ebx
je 0x402a44
push esi
add edi, eax
call fcn.00403390
lea esi, [esi + eax + 1]
cmp byte [esi], bl
pop ecx
jne 0x402aac
inc edi
lea eax, [edi + edi]
push eax
mov dword [esp + 0x18], edi
call fcn.0040348d
cmp eax, ebx
pop ecx
mov dword [esp + 0x10], eax
je 0x402b48
cmp byte [ebp], bl
mov edi, ebp
mov esi, eax
je 0x402b29
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 0x402b3e
push edi
call fcn.00403390
push esi
lea edi, [edi + eax + 1]
call fcn.00401353
cmp byte [edi], bl
pop ecx
pop ecx
lea esi, [esi + eax*2 + 2]
jne 0x402aef
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.00403350
pop ecx
push ebp
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
jmp 0x402a44
Function at 0x402b54
Capabilities:
Accept command line arguments

Disassembly:
mov eax, dword [0x408838]
push ebp
xor ebp, ebp
cmp eax, ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetCommandLineW]
jne 0x402b94
call esi
test eax, eax
je 0x402b79
mov dword [0x408838], 1
jmp 0x402b99
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x402b90
mov dword [0x408838], 2
jmp 0x402ba2
xor eax, eax
jmp 0x402bf0
cmp eax, 1
jne 0x402b9d
call esi
jmp 0x402bf0
cmp eax, 2
jne 0x402b90
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 0x402be8
lea eax, [esi + esi]
push eax
call fcn.0040348d
mov ebp, eax
test ebp, ebp
pop ecx
je 0x402be8
push esi
push ebp
push 0xffffffffffffffff
push ebx
push 1
push 0
call edi
test eax, eax
jne 0x402bec
push ebp
call fcn.00403350
pop ecx
xor eax, eax
jmp 0x402bee
mov eax, ebp
pop edi
pop ebx
pop esi
pop ebp
ret
Function at 0x402f69
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x39c]
sub esp, 0x41c
mov ecx, dword [ebp + 0x3a4]
cmp ecx, dword [0x40990c]
mov eax, dword [0x408030]
push ebx
push esi
mov dword [ebp + 0x398], eax
push edi
jae 0x40312f
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x409920]
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 0x40312f
xor edi, edi
cmp dword [ebp + 0x3ac], edi
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x7c], edi
jne 0x402fd3
xor eax, eax
jmp 0x403143
test al, 0x20
je 0x402fe4
push 2
push edi
push edi
push ecx
call fcn.00404c75
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x4030b9
cmp dword [ebp + 0x3ac], edi
mov eax, dword [ebp + 0x3a8]
mov dword [ebp - 0x70], eax
mov dword [ebp + 0x3a4], edi
jbe 0x403100
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp + 0x3a8]
lea eax, [ebp - 0x6c]
cmp ecx, dword [ebp + 0x3ac]
jae 0x403046
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x403037
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 0x403019
mov edi, eax
lea eax, [ebp - 0x6c]
sub edi, eax
push 0
lea eax, [ebp - 0x78]
push eax
push edi
lea eax, [ebp - 0x6c]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403086
mov eax, dword [ebp - 0x78]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x403092
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp + 0x3a8]
xor edi, edi
cmp eax, dword [ebp + 0x3ac]
jb 0x40300d
jmp 0x403094
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
xor edi, edi
mov eax, dword [ebp - 0x74]
cmp eax, edi
jne 0x40312a
cmp dword [ebp + 0x3a4], edi
je 0x403100
push 5
pop eax
cmp dword [ebp + 0x3a4], eax
jne 0x4030f2
mov dword [0x4085d4], eax
jmp 0x403136
push edi
lea ecx, [ebp - 0x78]
push ecx
push dword [ebp + 0x3ac]
push dword [ebp + 0x3a8]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4030e4
mov eax, dword [ebp - 0x78]
mov dword [ebp + 0x3a4], edi
mov dword [ebp - 0x74], eax
jmp 0x403094
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
jmp 0x403094
push dword [ebp + 0x3a4]
call fcn.00404b60
pop ecx
jmp 0x403140
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x403118
mov eax, dword [ebp + 0x3a8]
cmp byte [eax], 0x1a
je 0x402fcc
mov dword [0x4085d0], 0x1c
mov dword [0x4085d4], edi
jmp 0x403140
sub eax, dword [ebp - 0x7c]
jmp 0x403143
and dword [0x4085d4], 0
mov dword [0x4085d0], 9
or eax, 0xffffffff
mov ecx, dword [ebp + 0x398]
pop edi
pop esi
pop ebx
call fcn.0040139a
add ebp, 0x39c
leave
ret
Function at 0x403605
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x408840], ebx
push esi
push edi
jne 0x403685
push 0x406e60
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x4036c0
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x406e54
push edi
call esi
test eax, eax
mov dword [0x408840], eax
je 0x4036c0
push 0x406e44
push edi
call esi
push 0x406e30
push edi
mov dword [0x408844], eax
call esi
cmp dword [0x4085dc], 2
mov dword [0x408848], eax
jne 0x403685
push 0x406e14
push edi
call esi
test eax, eax
mov dword [0x408850], eax
je 0x403685
push 0x406dfc
push edi
call esi
mov dword [0x40884c], eax
mov eax, dword [0x40884c]
test eax, eax
je 0x4036ca
call eax
test eax, eax
je 0x4036b1
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x408850]
test eax, eax
je 0x4036b1
test byte [ebp - 8], 1
jne 0x4036ca
cmp dword [0x4085e8], 4
jb 0x4036c4
or byte [ebp + 0x12], 0x20
jmp 0x4036e9
xor eax, eax
jmp 0x4036f9
or byte [ebp + 0x12], 4
jmp 0x4036e9
mov eax, dword [0x408844]
test eax, eax
je 0x4036e9
call eax
mov ebx, eax
test ebx, ebx
je 0x4036e9
mov eax, dword [0x408848]
test eax, eax
je 0x4036e9
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x408840]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x403a12
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 0x403a40
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 0x403a47
cmp ebx, dword [eax + 4]
jae 0x403a47
xor eax, eax
jmp 0x403c37
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x403a58
xor eax, eax
inc eax
jmp 0x403c36
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x403a6e
cmp ecx, edx
jae 0x403bb3
cmp dword [eax + 4], 0
je 0x403a77
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x403a5f
cmp dword [ebp + 8], 0
je 0x403a99
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x403bb3
cmp eax, esi
jae 0x403bb3
mov eax, dword [0x408858]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x403abe
cmp dword [esi*4 + 0x408860], edi
je 0x403bb7
inc esi
cmp esi, eax
jl 0x403aac
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x403c33
cmp dword [ebp - 8], 0x1000000
jne 0x403c33
test byte [ebp - 0xc], 0xcc
je 0x403b3c
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x403c33
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x403c33
cmp word [eax + 0x18], 0x10b
jne 0x403c33
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x403c33
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x403b3c
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x403b3c
test byte [ecx + 0x27], 0x80
jne 0x403bb3
push 1
push 0x4088a0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x403a50
mov ecx, dword [0x408858]
test ecx, ecx
mov edx, ecx
jle 0x403b70
lea eax, [ecx*4 + 0x40885c]
cmp dword [eax], edi
je 0x403b70
dec edx
sub eax, 4
test edx, edx
jg 0x403b64
test edx, edx
jne 0x403ba1
push 0xf
pop ebx
cmp ecx, ebx
jg 0x403b7d
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x403b95
lea eax, [edx*4 + 0x408860]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x403b83
cmp ecx, 0x10
jge 0x403ba1
inc ecx
mov dword [0x408858], ecx
push 0
push 0x4088a0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x403a50
xor eax, eax
jmp 0x403c36
test esi, esi
jle 0x403a50
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x4088a0
call ebx
test eax, eax
jne 0x403a50
cmp dword [esi*4 + 0x408860], edi
je 0x403c0d
mov eax, dword [0x408858]
lea esi, [eax - 1]
test esi, esi
jl 0x403bfb
cmp dword [esi*4 + 0x408860], edi
je 0x403bf7
dec esi
jns 0x403beb
test esi, esi
jge 0x403c0b
cmp eax, 0x10
jge 0x403c06
inc eax
mov dword [0x408858], eax
lea esi, [eax - 1]
jmp 0x403c0d
je 0x403c25
xor ecx, ecx
test esi, esi
jl 0x403c25
lea eax, [ecx*4 + 0x408860]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x403c13
push 0
push 0x4088a0
call ebx
jmp 0x403a50
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x402306
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff004
push eax
add esp, 0xfffffffc
push ebx
push esi
mov dword [ebp - 4], ecx
mov ebx, eax
cmp dword [ebp + 8], 0
je 0x402326
mov eax, dword [ebp + 8]
mov byte [eax], 0
test ebx, ebx
je 0x40232f
cmp byte [ebx], 0
jne 0x402336
xor eax, eax
jmp 0x4023b6
xor esi, esi
jmp 0x402379
mov al, byte [ebx]
xor ecx, ecx
mov cl, al
inc ebx
cmp ecx, 0x3d
jne 0x402360
cmp dword [ebp - 4], 0
je 0x402360
test esi, esi
jne 0x402360
cmp dword [ebp + 8], 0
je 0x40235c
mov eax, dword [ebp + 8]
mov byte [eax], 1
mov esi, edx
jmp 0x402379
xor ecx, ecx
mov cl, al
cmp ecx, 0xd
je 0x40236e
cmp ecx, 0xa
jne 0x402376
cmp ecx, 0xd
jne 0x40237e
inc ebx
jmp 0x40237e
mov byte [edx], al
inc edx
cmp byte [ebx], 0
jne 0x40233a
mov byte [edx], 0
cmp dword [ebp - 4], 0
je 0x4023b4
mov eax, dword [ebp - 4]
test esi, esi
mov byte [eax], 0
je 0x4023b4
push 0x1000
lea edx, [ebp - 0x1004]
push edx
push esi
call sub.KERNEL32.DLL_ExpandEnvironmentStringsA
lea edx, [ebp - 0x1004]
mov eax, dword [ebp - 4]
call fcn.00406b54
mov byte [esi], 0
mov eax, ebx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4