joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4035d0
Capabilities:
Accept command line arguments

Disassembly:
mov eax, 0x40b290
call fcn.00404ee4
mov eax, 0x1048
call fcn.00404800
mov eax, dword [0x410eec]
mov dword [ebp - 0x10], eax
xor eax, eax
cmp dword [ebp + 0xc], eax
je 0x40377d
mov dword [ebp - 0x1038], eax
mov dword [ebp - 0x1034], eax
push esi
lea eax, [ebp - 0x1034]
push eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov esi, eax
xor eax, eax
inc eax
cmp dword [ebp - 0x1034], eax
mov dword [ebp - 0x1030], eax
jle 0x403766
push ebx
push edi
and word [ebp - 0x102c], 0
xor eax, eax
mov ebx, 0x1ff
mov ecx, ebx
lea edi, [ebp - 0x102a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [ebp - 0x1030]
push dword [esi + eax*4]
lea eax, [ebp - 0x102c]
push eax
call fcn.00404725
lea eax, [ebp - 0x102c]
push eax
call fcn.00404f8b
and word [ebp - 0x82c], 0
push dword [ebp + 8]
xor eax, eax
mov ecx, ebx
lea edi, [ebp - 0x82a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x82c]
push eax
call fcn.00404725
lea eax, [ebp - 0x82c]
push eax
call fcn.00404f8b
add esp, 0x18
lea eax, [ebp - 0x102c]
push eax
lea ecx, [ebp - 0x1054]
call fcn.00403447
and dword [ebp - 4], 0
lea ecx, [ebp - 0x82c]
push ecx
mov ecx, eax
call fcn.00402426
mov ebx, eax
neg ebx
sbb bl, bl
or dword [ebp - 4], 0xffffffff
xor edi, edi
push 0
inc edi
push edi
lea ecx, [ebp - 0x1054]
inc bl
call fcn.00402d52
test bl, bl
mov ebx, dword [ebp - 0x1030]
je 0x403730
mov ecx, dword [ebp - 0x1034]
lea eax, [ebx + 1]
dec ecx
cmp eax, ecx
jg 0x403730
push dword [esi + ebx*4 + 4]
lea ecx, [ebp - 0x2c]
call fcn.00403447
push edi
push 0
lea eax, [ebp - 0x1030]
push eax
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x1030], 0x2f
call fcn.00402281
test eax, eax
jne 0x403745
push eax
push edi
lea ecx, [ebp - 0x2c]
call fcn.00402d52
inc ebx
cmp ebx, dword [ebp - 0x1034]
mov dword [ebp - 0x1030], ebx
jl 0x403631
jmp 0x403764
push dword [esi + ebx*4 + 4]
push dword [ebp + 0xc]
call fcn.00404725
pop ecx
pop ecx
push 0
push edi
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x1038], edi
call fcn.00402d52
pop edi
pop ebx
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x1038]
pop esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
call fcn.00403dff
leave
ret
Function at 0x4039da
Capabilities:
Get common file path
Query or enumerate registry value
Set environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x380]
sub esp, 0x408
mov eax, dword [0x410eec]
push ebx
push esi
push edi
mov dword [ebp + 0x37c], eax
push 0x3b
pop ecx
xor eax, eax
lea edi, [ebp + 0x86]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp + 0x84]
push eax
xor esi, esi
push 0x40cc58
xor ebx, ebx
mov word [ebp + 0x84], si
call fcn.004035d0
lea eax, [ebp + 0x84]
push str.thunder
push eax
call fcn.0040483d
xor edi, edi
add esp, 0x10
inc edi
test eax, eax
jne 0x403a43
push 0x40c434
jmp 0x403a68
lea eax, [ebp + 0x84]
push 0x40cc40
push eax
call fcn.0040483d
test eax, eax
pop ecx
pop ecx
jne 0x403a63
mov ebx, edi
push 0x40c430
jmp 0x403a68
push 0x40c588
push str.InstallSource
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
cmp ebx, esi
mov dword [ebp + 0x80], esi
jne 0x403aeb
push esi
lea eax, [ebp + 0x174]
push eax
push str.Path
push str.SOFTWAREThunder_NetworkThunderOem_thunder_backwnd
push 0x80000002
call dword [sym.imp.SHLWAPI.dll_SHRegGetPathW]
test eax, eax
jne 0x403c2a
lea eax, [ebp + 0x174]
push 0x5c
push eax
call fcn.004046b5
test eax, eax
pop ecx
pop ecx
je 0x403c2a
lea eax, [ebp + 0x174]
push 0x5c
push eax
call fcn.004046b5
mov word [eax + 2], si
lea eax, [ebp + 0x174]
push eax
push 0x411a38
call fcn.00404725
add esp, 0x10
mov dword [ebp + 0x80], edi
jmp 0x403c2a
cmp ebx, edi
jne 0x403c2a
push esi
lea eax, [ebp + 0x174]
push eax
push str.Path
push str.SOFTWAREThunder_NetworkXmp
push 0x80000002
call dword [sym.imp.SHLWAPI.dll_SHRegGetPathW]
test eax, eax
jne 0x403c2a
lea eax, [ebp + 0x174]
push 0x5c
push eax
call fcn.004046b5
test eax, eax
pop ecx
pop ecx
je 0x403b58
lea eax, [ebp + 0x174]
push 0x5c
push eax
call fcn.004046b5
mov word [eax + 2], si
lea eax, [ebp + 0x174]
push eax
push 0x411628
call fcn.00404725
add esp, 0x10
mov dword [ebp + 0x80], edi
push str.shell32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
cmp eax, esi
je 0x403c2a
push str.SHGetKnownFolderPath
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, esi
je 0x403be6
lea ecx, [ebp + 0x7c]
push ecx
push esi
push esi
push 0x40c29c
mov dword [ebp + 0x7c], esi
call eax
test eax, eax
jl 0x403c2a
push dword [ebp + 0x7c]
lea eax, [ebp - 0x84]
lea ecx, [ebp - 0x88]
mov dword [ebp - 0x88], eax
call fcn.00401fed
push dword [ebp - 0x88]
lea eax, [ebp + 0x174]
push eax
call fcn.00404725
lea eax, [ebp - 0x84]
cmp dword [ebp - 0x88], eax
pop ecx
pop ecx
je 0x403bdb
push dword [ebp - 0x88]
call fcn.004047ba
pop ecx
push dword [ebp + 0x7c]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
jmp 0x403bf8
lea eax, [ebp + 0x174]
push eax
push esi
push esi
push 0x23
push esi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
lea eax, [ebp + 0x174]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
push str.Thunder_NetworkXMP4coreprogram_
lea eax, [ebp + 0x174]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp + 0x174]
push eax
push 0x411a38
call fcn.00404725
pop ecx
pop ecx
mov ecx, dword [ebp + 0x37c]
mov eax, dword [ebp + 0x80]
pop edi
pop esi
pop ebx
call fcn.00403dff
add ebp, 0x380
leave
ret
Function at 0x403c46
Capabilities:
Delete file

Disassembly:
mov eax, 0x40b2a2
call fcn.00404ee4
push 0x411830
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp dword [ebp + 8], 1
je 0x403c84
push 0x411c40
lea ecx, [ebp + 8]
call fcn.004033f7
and dword [ebp - 4], 0
push eax
call fcn.00403244
pop ecx
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
call fcn.00401369
mov ecx, dword [ebp - 0xc]
xor eax, eax
mov dword fs:[0], ecx
leave
ret

Function at 0x403c92
Capabilities:
Query or enumerate registry value
Set environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x74]
sub esp, 0x2fc
mov eax, dword [0x410eec]
push ebx
push esi
push edi
mov dword [ebp + 0x70], eax
push 0x3b
pop ecx
xor eax, eax
lea edi, [ebp - 0x7e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x80]
push eax
xor ebx, ebx
push 0x40cc58
mov word [ebp - 0x80], bx
call fcn.004035d0
lea eax, [ebp - 0x80]
push str.thunder
push eax
call fcn.0040483d
add esp, 0x10
test eax, eax
jne 0x403ce6
xor esi, esi
push 0x40c434
jmp 0x403d06
lea eax, [ebp - 0x80]
push 0x40cc40
push eax
call fcn.0040483d
test eax, eax
pop ecx
pop ecx
jne 0x403da4
xor esi, esi
inc esi
push 0x40c430
push str.InstallSource
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
xor eax, eax
cmp esi, ebx
mov word [ebp - 0x288], bx
mov ecx, 0x81
lea edi, [ebp - 0x286]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
jne 0x403d41
push ebx
lea eax, [ebp - 0x288]
push eax
push str.Path
push str.SOFTWAREThunder_NetworkThunderOem_thunder_backwnd
jmp 0x403d58
cmp esi, 1
jne 0x403d9f
push ebx
lea eax, [ebp - 0x288]
push eax
push str.Path
push str.SOFTWAREThunder_NetworkXmp
push 0x80000002
call dword [sym.imp.SHLWAPI.dll_SHRegGetPathW]
test eax, eax
jne 0x403d9f
lea eax, [ebp - 0x288]
push 0x5c
push eax
call fcn.004046b5
test eax, eax
pop ecx
pop ecx
je 0x403d9f
lea eax, [ebp - 0x288]
push 0x5c
push eax
call fcn.004046b5
mov word [eax + 2], bx
lea eax, [ebp - 0x288]
push eax
push dword [ebp + 0x7c]
call fcn.00402689
add esp, 0x10
xor eax, eax
inc eax
jmp 0x403da6
xor eax, eax
mov ecx, dword [ebp + 0x70]
pop edi
pop esi
pop ebx
call fcn.00403dff
add ebp, 0x74
leave
ret
Function at 0x405177
Capabilities:
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x40cce8
call fcn.00404560
mov edi, 0x94
mov eax, edi
call fcn.00404800
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 [0x412110], ecx
mov eax, dword [esi + 4]
mov dword [0x41211c], eax
mov edx, dword [esi + 8]
mov dword [0x412120], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x412114], esi
cmp ecx, 2
je 0x4051d7
or esi, 0x8000
mov dword [0x412114], esi
shl eax, 8
add eax, edx
mov dword [0x412118], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x405212
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x405212
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x40522a
cmp eax, 0x20b
je 0x405217
mov dword [ebp - 0x1c], esi
jmp 0x40523e
cmp dword [ecx + 0x84], 0xe
jbe 0x405212
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x405238
cmp dword [ecx + 0x74], 0xe
jbe 0x405212
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.00406206
pop ecx
test eax, eax
jne 0x40526a
cmp dword [0x412068], 1
jne 0x405257
call fcn.00407f85
push 0x1c
call fcn.00407e0e
push 0xff
call fcn.00407c3b
pop ecx
pop ecx
call fcn.004087f2
mov dword [ebp - 4], esi
call fcn.00408647
test eax, eax
jge 0x405283
push 0x1b
call fcn.00405152
pop ecx
call fcn.004085a8
mov dword [0x4137b8], eax
call fcn.0040843e
mov dword [0x412064], eax
call fcn.004083a8
test eax, eax
jge 0x4052a8
push 8
call fcn.00405152
pop ecx
call fcn.00408175
test eax, eax
jge 0x4052b9
push 9
call fcn.00405152
pop ecx
push 1
call fcn.00407c6b
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x4052cf
push eax
call fcn.00405152
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
call fcn.0040812f
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x4052f0
movzx eax, word [ebp - 0x40]
jmp 0x4052f3
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00401020
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x405311
push edi
call fcn.00407d96
call fcn.00407db8
jmp 0x405343
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0040459b
ret
Function at 0x4055f6
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 0x405624
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 0x40562b
cmp ebx, dword [eax + 4]
jae 0x40562b
xor eax, eax
jmp 0x40581b
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x40563c
xor eax, eax
inc eax
jmp 0x40581a
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x405652
cmp ecx, edx
jae 0x405797
cmp dword [eax + 4], 0
je 0x40565b
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x405643
cmp dword [ebp + 8], 0
je 0x40567d
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x405797
cmp eax, esi
jae 0x405797
mov eax, dword [0x412078]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x4056a2
cmp dword [esi*4 + 0x412080], edi
je 0x40579b
inc esi
cmp esi, eax
jl 0x405690
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x405817
cmp dword [ebp - 8], 0x1000000
jne 0x405817
test byte [ebp - 0xc], 0xcc
je 0x405720
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x405817
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x405817
cmp word [eax + 0x18], 0x10b
jne 0x405817
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x405817
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x405720
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x405720
test byte [ecx + 0x27], 0x80
jne 0x405797
push 1
push 0x4120c0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x405634
mov ecx, dword [0x412078]
test ecx, ecx
mov edx, ecx
jle 0x405754
lea eax, [ecx*4 + 0x41207c]
cmp dword [eax], edi
je 0x405754
dec edx
sub eax, 4
test edx, edx
jg 0x405748
test edx, edx
jne 0x405785
push 0xf
pop ebx
cmp ecx, ebx
jg 0x405761
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x405779
lea eax, [edx*4 + 0x412080]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x405767
cmp ecx, 0x10
jge 0x405785
inc ecx
mov dword [0x412078], ecx
push 0
push 0x4120c0
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x405634
xor eax, eax
jmp 0x40581a
test esi, esi
jle 0x405634
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x4120c0
call ebx
test eax, eax
jne 0x405634
cmp dword [esi*4 + 0x412080], edi
je 0x4057f1
mov eax, dword [0x412078]
lea esi, [eax - 1]
test esi, esi
jl 0x4057df
cmp dword [esi*4 + 0x412080], edi
je 0x4057db
dec esi
jns 0x4057cf
test esi, esi
jge 0x4057ef
cmp eax, 0x10
jge 0x4057ea
inc eax
mov dword [0x412078], eax
lea esi, [eax - 1]
jmp 0x4057f1
je 0x405809
xor ecx, ecx
test esi, esi
jl 0x405809
lea eax, [ecx*4 + 0x412080]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x4057f7
push 0
push 0x4120c0
call ebx
jmp 0x405634
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40779d
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.00404800
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x407838
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 [0x412110]
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 0x407838
cmp eax, 1
je 0x407859
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 0x407838
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x407805
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x407834
xor eax, eax
inc eax
jmp 0x407878
cmp edi, eax
jae 0x40783c
xor eax, eax
jmp 0x407878
cmp eax, esi
jae 0x407843
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 [0x412110]
jmp 0x40785c
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 0x407cd5
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x412150], esi
push edi
jne 0x407cf5
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 [0x41214c], esi
mov byte [0x412148], al
jne 0x407d5b
mov ecx, dword [0x413788]
test ecx, ecx
je 0x407d3c
mov eax, dword [0x413784]
sub eax, 4
cmp eax, ecx
jmp 0x407d35
mov eax, dword [eax]
test eax, eax
je 0x407d27
call eax
mov eax, dword [0x413784]
sub eax, 4
cmp eax, dword [0x413788]
mov dword [0x413784], eax
jae 0x407d1f
mov eax, 0x40f030
mov esi, 0x40f038
cmp eax, esi
mov edi, eax
jae 0x407d5b
mov eax, dword [edi]
test eax, eax
je 0x407d54
call eax
add edi, 4
cmp edi, esi
jb 0x407d4c
mov eax, 0x40f03c
mov esi, 0x40f044
cmp eax, esi
mov edi, eax
jae 0x407d7a
mov eax, dword [edi]
test eax, eax
je 0x407d73
call eax
add edi, 4
cmp edi, esi
jb 0x407d6b
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x407d94
push dword [ebp + 8]
mov dword [0x412150], 1
call fcn.00407c3b
pop ebp
ret
Function at 0x407e0e
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x410eec]
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 + 0x410f58]
je 0x407e43
inc eax
cmp eax, 0x13
jb 0x407e34
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x410f58]
jne 0x407f69
mov eax, dword [0x412068]
cmp eax, 1
je 0x407f41
cmp eax, edx
jne 0x407e73
cmp dword [0x410f24], 1
je 0x407f41
cmp ecx, 0xfc
je 0x407f69
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 0x407ea9
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00404910
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00408ab0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x407edd
mov eax, edi
push eax
call fcn.00408ab0
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x40cd2c
push edi
call fcn.00408980
add esp, 0x10
push edi
call fcn.00408ab0
push dword [esi + 0x410f5c]
mov ebx, eax
call fcn.00408ab0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00404800
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00404910
push edi
push ebx
call fcn.00404920
push 0x40cd28
push ebx
call fcn.00404920
push dword [esi + 0x410f5c]
push ebx
call fcn.00404920
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.0040887a
add esp, 0x2c
jmp 0x407f69
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x410f5c]
push dword [esi]
call fcn.00408ab0
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.00403dff
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x40843e
Capabilities:
Query environment variable

Disassembly:
push ecx
push ecx
mov eax, dword [0x41236c]
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 0x408487
call ebp
mov esi, eax
cmp esi, ebx
je 0x40846d
mov dword [0x41236c], 1
jmp 0x40848c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x408482
push 2
pop eax
mov dword [0x41236c], eax
jmp 0x408487
mov eax, dword [0x41236c]
cmp eax, 1
jne 0x4084e4
cmp esi, ebx
jne 0x40849f
call ebp
mov esi, eax
cmp esi, ebx
jne 0x40849f
xor eax, eax
jmp 0x40858b
cmp word [esi], bx
mov eax, esi
je 0x4084b4
inc eax
inc eax
cmp word [eax], bx
jne 0x4084a6
inc eax
inc eax
cmp word [eax], bx
jne 0x4084a6
sub eax, esi
inc eax
inc eax
mov ebp, eax
push ebp
call fcn.004048e1
mov edi, eax
cmp edi, ebx
pop ecx
jne 0x4084d7
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
jmp 0x40858b
push ebp
push esi
push edi
call fcn.00403e10
add esp, 0xc
jmp 0x4084c9
cmp eax, 2
je 0x4084ed
cmp eax, ebx
jne 0x408498
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebp, eax
cmp ebp, ebx
je 0x408498
cmp byte [ebp], bl
mov esi, ebp
je 0x408523
push ebx
push ebx
push 0xffffffffffffffff
push esi
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp eax, ebx
je 0x408498
push esi
add edi, eax
call fcn.00408ab0
lea esi, [esi + eax + 1]
cmp byte [esi], bl
pop ecx
jne 0x408500
inc edi
lea eax, [edi + edi]
push eax
mov dword [esp + 0x18], edi
call fcn.004048e1
cmp eax, ebx
pop ecx
mov dword [esp + 0x10], eax
je 0x40859c
cmp byte [ebp], bl
mov edi, ebp
mov esi, eax
je 0x40857d
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 0x408592
push edi
call fcn.00408ab0
push esi
lea edi, [edi + eax + 1]
call fcn.004046e5
cmp byte [edi], bl
pop ecx
pop ecx
lea esi, [esi + eax*2 + 2]
jne 0x408543
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.004047ba
pop ecx
push ebp
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
jmp 0x408498
Function at 0x4085a8
Capabilities:
Accept command line arguments

Disassembly:
mov eax, dword [0x412370]
push ebp
xor ebp, ebp
cmp eax, ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetCommandLineW]
jne 0x4085e8
call esi
test eax, eax
je 0x4085cd
mov dword [0x412370], 1
jmp 0x4085ed
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x4085e4
mov dword [0x412370], 2
jmp 0x4085f6
xor eax, eax
jmp 0x408644
cmp eax, 1
jne 0x4085f1
call esi
jmp 0x408644
cmp eax, 2
jne 0x4085e4
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 0x40863c
lea eax, [esi + esi]
push eax
call fcn.004048e1
mov ebp, eax
test ebp, ebp
pop ecx
je 0x40863c
push esi
push ebp
push 0xffffffffffffffff
push ebx
push 1
push 0
call edi
test eax, eax
jne 0x408640
push ebp
call fcn.004047ba
pop ecx
xor eax, eax
jmp 0x408642
mov eax, ebp
pop edi
pop ebx
pop esi
pop ebp
ret

Function at 0x40887a
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x412374], ebx
push esi
push edi
jne 0x4088fa
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x408935
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x412374], eax
je 0x408935
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x412378], eax
call esi
cmp dword [0x412110], 2
mov dword [0x41237c], eax
jne 0x4088fa
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x412384], eax
je 0x4088fa
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x412380], eax
mov eax, dword [0x412380]
test eax, eax
je 0x40893f
call eax
test eax, eax
je 0x408926
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x412384]
test eax, eax
je 0x408926
test byte [ebp - 8], 1
jne 0x40893f
cmp dword [0x41211c], 4
jb 0x408939
or byte [ebp + 0x12], 0x20
jmp 0x40895e
xor eax, eax
jmp 0x40896e
or byte [ebp + 0x12], 4
jmp 0x40895e
mov eax, dword [0x412378]
test eax, eax
je 0x40895e
call eax
mov ebx, eax
test ebx, ebx
je 0x40895e
mov eax, dword [0x41237c]
test eax, eax
je 0x40895e
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x412374]
pop edi
pop esi
pop ebx
leave
ret