joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403028
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call fcn.00403104
pop ecx
test al, al
pop ecx
jne 0x403054
push 1
push str.Error:_could_not_find_Java_2_Runtime_Environment.
call fcn.00403598
pop ecx
pop ecx
push 2
call dword [sym.imp.MSVCRT.dll_exit]
push 0
call fcn.00403022
push eax
push dword [ebp + 0x10]
call fcn.00402a7e
add esp, 0xc
cmp eax, 1
jge 0x403082
push 1
push str.Error:_no_known_VMs.__check_for_corrupt_jvm.cfg_file_
call fcn.00403598
pop ecx
pop ecx
push 1
call dword [sym.imp.MSVCRT.dll_exit]
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00401537
push dword [ebp + 0x1c]
mov ebx, dword [ebp + 0x18]
mov edi, eax
and byte [ebx], 0
push ebx
push edi
mov dword [ebp + 0x14], edi
push dword [ebp + 0x10]
call fcn.004031cc
add esp, 0x1c
test al, al
jne 0x403100
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ebx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
push esi
dec ecx
mov esi, str.Error:_no___s_JVM_at___s.
add edx, ecx
mov edi, esi
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
add edx, ecx
push edx
call fcn.004020bf
push ebx
mov edi, eax
push dword [ebp + 0x14]
push esi
push edi
call dword [sym.imp.MSVCRT.dll_sprintf]
push 1
push edi
call fcn.00403598
add esp, 0x1c
push 4
call dword [sym.imp.MSVCRT.dll_exit]
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x403684
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
push ebx
push esi
mov esi, 0x104
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
lea ecx, [ebp - 0x114]
xor eax, eax
push esi
push ecx
push eax
push dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
call edi
test eax, eax
jne 0x403723
mov ebx, dword [sym.imp.MSVCRT.dll_free]
mov eax, dword [ebp + 8]
inc dword [ebp - 0xc]
push dword [eax + 8]
lea eax, [ebp - 0x114]
push eax
call fcn.0040424e
pop ecx
test eax, eax
pop ecx
je 0x403708
cmp dword [ebp - 8], 0
je 0x4036f7
push dword [ebp - 8]
lea eax, [ebp - 0x114]
push eax
call fcn.0040417f
pop ecx
test eax, eax
pop ecx
jle 0x403708
push dword [ebp - 8]
call ebx
pop ecx
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.MSVCRT.dll__strdup]
pop ecx
mov dword [ebp - 8], eax
lea eax, [ebp - 0x114]
push esi
push eax
push dword [ebp - 0xc]
push dword [ebp + 0xc]
call edi
test eax, eax
je 0x4036bb
mov edi, dword [ebp - 8]
test edi, edi
jne 0x403727
xor eax, eax
jmp 0x40379d
lea eax, [ebp - 4]
push eax
push 0x20019
push 0
push edi
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
push edi
je 0x40374a
call ebx
cmp dword [ebp - 4], 0
pop ecx
jmp 0x403774
call ebx
pop ecx
lea eax, [ebp - 0x10]
push eax
mov dword [ebp - 0x10], esi
lea eax, [ebp - 0x114]
xor esi, esi
push eax
push esi
push esi
push str.JavaHome
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x403781
cmp dword [ebp - 4], esi
je 0x403723
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x403723
cmp dword [ebp - 4], esi
je 0x40378f
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.MSVCRT.dll__strdup]
pop ecx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4037a2
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
push ebx
push edi
lea eax, [ebp - 0x104]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4037db
push 1
push str.Unable_to_resolve_path_to_current_executable
call fcn.00403598
pop ecx
pop ecx
push 1
call dword [sym.imp.MSVCRT.dll_exit]
mov edi, dword [ebp + 8]
or ebx, 0xffffffff
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [ebp - 0x104]
push ecx
push eax
push dword [ebp + 8]
call dword [sym.imp.MSVCRT.dll__strnicmp]
add esp, 0xc
test eax, eax
je 0x4038b0
mov edi, dword [ebp + 8]
mov ecx, ebx
xor eax, eax
push esi
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebp - 0x104]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, edx
mov ecx, ebx
repne scasb al, byte es:[edi]
dec edi
mov esi, str._bin_
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov edi, edx
mov ecx, ebx
repne scasb al, byte es:[edi]
mov eax, str.java
dec edi
mov esi, eax
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov edi, dword [ebp + 0xc]
mov dword [edi], eax
cmp byte [0x40afb2], 0
je 0x403895
mov esi, dword [sym.imp.MSVCRT.dll_printf]
lea eax, [ebp - 0x104]
push eax
push str.execv___s_
call esi
mov eax, dword [edi]
pop ecx
test eax, eax
pop ecx
je 0x40388d
mov ebx, edi
push eax
push str.____s_
call esi
mov eax, dword [ebx + 4]
add ebx, 4
pop ecx
test eax, eax
pop ecx
jne 0x403879
push 0x409aa4
call esi
pop ecx
lea eax, [ebp - 0x104]
push edi
push eax
push 0
call dword [sym.imp.MSVCRT.dll__spawnv]
add esp, 0xc
push eax
call dword [sym.imp.MSVCRT.dll_exit]
pop esi
pop edi
pop ebx
leave
ret
Function at 0x403a58
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
push 0
push dword [esi + 8]
push dword [ebp + 8]
call dword [sym.imp.MSVCRT.dll__lseek]
add esp, 0xc
test eax, eax
jl 0x403b53
mov eax, dword [esi + 4]
inc eax
push eax
call dword [sym.imp.MSVCRT.dll_malloc]
mov ebx, eax
pop ecx
test ebx, ebx
je 0x403b53
mov edi, dword [esi + 4]
push edi
push ebx
push dword [ebp + 8]
call dword [sym.imp.MSVCRT.dll__read]
add esp, 0xc
cmp eax, edi
je 0x403ab4
push ebx
call dword [sym.imp.MSVCRT.dll_free]
jmp 0x403b52
mov eax, dword [esi + 0xc]
xor ecx, ecx
cmp eax, ecx
jne 0x403ac7
and byte [edi + ebx], cl
mov eax, ebx
jmp 0x403b55
cmp eax, 8
jne 0x403b53
push 0x38
push 0x409b10
lea eax, [ebp - 0x38]
push 0xfffffffffffffff1
push eax
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], edi
call fcn.00404590
add esp, 0x10
test eax, eax
jl 0x403aa8
mov eax, dword [esi]
inc eax
push eax
call dword [sym.imp.MSVCRT.dll_malloc]
mov edi, eax
pop ecx
test edi, edi
je 0x403aa8
mov eax, dword [esi]
push 1
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x38]
push eax
mov dword [ebp - 0x2c], edi
call fcn.0040467a
pop ecx
test eax, eax
pop ecx
jge 0x403b31
mov esi, dword [sym.imp.MSVCRT.dll_free]
push ebx
call esi
push edi
call esi
pop ecx
jmp 0x403b52
mov eax, dword [esi]
mov esi, dword [sym.imp.MSVCRT.dll_free]
push ebx
and byte [eax + edi], 0
call esi
lea eax, [ebp - 0x38]
push eax
call fcn.00404552
pop ecx
test eax, eax
pop ecx
jge 0x403b5a
push edi
call esi
pop ecx
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
mov eax, edi
jmp 0x403b55
Function at 0x403de5
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, dword [sym.imp.MSVCRT.dll__lseek]
push edi
push 2
push 0xffffffffffffffea
push dword [ebp + 8]
call esi
add esp, 0xc
mov dword [ebp - 4], eax
test eax, eax
jl 0x403f19
mov ebx, dword [ebp + 0xc]
mov edi, dword [sym.imp.MSVCRT.dll__read]
push 0x16
push ebx
push dword [ebp + 8]
call edi
add esp, 0xc
test eax, eax
jl 0x403f19
movzx ecx, byte [ebx + 1]
xor eax, eax
mov ah, byte [ebx + 3]
mov al, byte [ebx + 2]
shl eax, 8
or eax, ecx
movzx ecx, byte [ebx]
shl eax, 8
or eax, ecx
cmp eax, 0x6054b50
jne 0x403e4f
mov eax, dword [ebp - 4]
jmp 0x403f1c
push 2
push 0
push dword [ebp + 8]
call esi
add esp, 0xc
mov dword [ebp - 0xc], eax
test eax, eax
jl 0x403f19
mov ebx, 0x10015
mov dword [ebp - 4], eax
cmp eax, ebx
jl 0x403e75
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 4]
push 2
neg eax
push eax
push dword [ebp + 8]
call esi
add esp, 0xc
test eax, eax
jl 0x403f19
push ebx
call dword [sym.imp.MSVCRT.dll_malloc]
mov esi, eax
pop ecx
test esi, esi
mov dword [ebp - 8], esi
je 0x403f19
push dword [ebp - 4]
push esi
push dword [ebp + 8]
call edi
add esp, 0xc
test eax, eax
jl 0x403f11
add eax, esi
mov dword [ebp + 8], eax
lea ebx, [eax - 0x16]
cmp ebx, esi
jb 0x403f11
cmp byte [ebx], 0x50
jne 0x403eee
movzx edx, byte [ebx + 1]
xor ecx, ecx
mov ch, byte [ebx + 3]
mov cl, byte [ebx + 2]
shl ecx, 8
or ecx, edx
shl ecx, 8
or ecx, 0x50
cmp ecx, 0x6054b50
jne 0x403eee
xor ecx, ecx
mov ch, byte [ebx + 0x15]
mov cl, byte [ebx + 0x14]
lea ecx, [ecx + ebx + 0x16]
cmp ecx, eax
je 0x403ef1
dec ebx
jmp 0x403eb6
mov edi, dword [ebp + 0xc]
push 5
pop ecx
mov esi, ebx
rep movsd dword es:[edi], dword [esi]
push dword [ebp - 8]
movsw word es:[edi], word [esi]
call dword [sym.imp.MSVCRT.dll_free]
mov eax, ebx
pop ecx
sub eax, dword [ebp + 8]
add eax, dword [ebp - 0xc]
jmp 0x403f1c
push esi
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4065fa
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x407378
push 0x406730
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
and dword [ebp - 4], 0
push 1
call dword [sym.imp.MSVCRT.dll___set_app_type]
pop ecx
or dword [0x40aff8], 0xffffffff
or dword [0x40affc], 0xffffffff
call dword [sym.imp.MSVCRT.dll___p__fmode]
mov ecx, dword [0x40aff4]
mov dword [eax], ecx
call dword [sym.imp.MSVCRT.dll___p__commode]
mov ecx, dword [0x40aff0]
mov dword [eax], ecx
mov eax, dword [sym.imp.MSVCRT.dll__adjust_fdiv]
mov eax, dword [eax]
mov dword [0x40b000], eax
call fcn.004064cb
cmp dword [0x40af90], 0
jne 0x40667d
push 0x406728
call dword [sym.imp.MSVCRT.dll___setusermatherr]
pop ecx
call fcn.00406716
push 0x40800c
push 0x408008
call sub.MSVCRT.dll__initterm
mov eax, dword [0x40afec]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x28]
push eax
push dword [0x40afe8]
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.MSVCRT.dll___getmainargs]
push 0x408004
push section..data
call sub.MSVCRT.dll__initterm
call dword [sym.imp.MSVCRT.dll___p___initenv]
mov ecx, dword [ebp - 0x20]
mov dword [eax], ecx
push dword [ebp - 0x20]
push dword [ebp - 0x2c]
push dword [ebp - 0x1c]
call section..text
add esp, 0x30
mov dword [ebp - 0x24], eax
push eax
call dword [sym.imp.MSVCRT.dll_exit]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
mov ecx, dword [ecx]
mov dword [ebp - 0x30], ecx
push eax
push ecx
call sub.MSVCRT.dll__XcptFilter
pop ecx
pop ecx
ret
Function at 0x401000
Capabilities:
Copy file
Get common file path
Print debug messages

Disassembly:
sub esp, 0x618
mov eax, dword [0x409040]
mov dword [esp + 0x614], eax
mov eax, dword [0x4096c0]
mov eax, dword [eax + 4]
push 0x104
push eax
lea ecx, [esp + 8]
push ecx
call fcn.00401310
add esp, 0xc
cmp eax, 1
jae 0x401053
push str.Command_line_conversion_failed_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
or eax, 0xffffffff
mov ecx, dword [esp + 0x614]
call fcn.004014fa
add esp, 0x618
ret
push esi
lea edx, [esp + 0x514]
push edx
lea eax, [esp + 0x210]
push eax
push 0
lea ecx, [esp + 0x10]
push 0
push ecx
call fcn.004011c8
add esp, 0x14
push 0x104
lea edx, [esp + 0x314]
push edx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [esp + 0x20c]
push eax
lea ecx, [esp + 0x314]
push ecx
lea edx, [esp + 0x110]
push str._s_s.scr
push edx
call fcn.00401170
lea eax, [esp + 0x118]
push eax
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x42c]
push str.copy:__s_to__s_n
push edx
call fcn.00401170
mov esi, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
add esp, 0x20
lea eax, [esp + 0x414]
push eax
call esi
push 0
lea ecx, [esp + 0x10c]
push ecx
lea edx, [esp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x401112
push str.copy_succeded_n
call esi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x614]
call fcn.004014fa
add esp, 0x618
ret
push str.copy_failed_n
call esi
mov ecx, dword [esp + 0x618]
or eax, 0xffffffff
pop esi
call fcn.004014fa
add esp, 0x618
ret

Function at 0x401130
Capabilities:
Accept command line arguments
Print debug messages

Disassembly:
push ecx
lea eax, [esp]
push eax
mov dword [esp + 4], 0
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov dword [0x4096c0], eax
cmp dword [esp], 2
jge 0x401167
push str.Not_enough_args___please_pass_in_the_source_path_of_the_screen_saver_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
or eax, 0xffffffff
pop ecx
ret 0x10
call fcn.00401000
pop ecx
ret 0x10
Function at 0x40152d
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x4071c0
call fcn.004028fc
mov edi, 0x94
mov eax, edi
call fcn.00403470
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 [0x4096e0], ecx
mov eax, dword [esi + 4]
mov dword [0x4096ec], eax
mov edx, dword [esi + 8]
mov dword [0x4096f0], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x4096e4], esi
cmp ecx, 2
je 0x40158d
or esi, reloc.KERNEL32.dll_CopyFileA
mov dword [0x4096e4], esi
shl eax, 8
add eax, edx
mov dword [0x4096e8], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x4015c8
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4015c8
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x4015e0
cmp eax, 0x20b
je 0x4015cd
mov dword [ebp - 0x1c], esi
jmp 0x4015f4
cmp dword [ecx + 0x84], 0xe
jbe 0x4015c8
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x4015ee
cmp dword [ecx + 0x74], 0xe
jbe 0x4015c8
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.00403413
pop ecx
test eax, eax
jne 0x401620
cmp dword [0x4096cc], 1
jne 0x40160d
call fcn.00402bc8
push 0x1c
call fcn.00402a51
push 0xff
call fcn.004025b1
pop ecx
pop ecx
call fcn.00403371
mov dword [ebp - 4], esi
call fcn.004031c6
test eax, eax
jge 0x401639
push 0x1b
call fcn.00401508
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x40ac60], eax
call fcn.004030a4
mov dword [0x4096c4], eax
call fcn.00403002
test eax, eax
jge 0x40165f
push 8
call fcn.00401508
pop ecx
call fcn.00402dcf
test eax, eax
jge 0x401670
push 9
call fcn.00401508
pop ecx
push 1
call fcn.004025e1
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x401686
push eax
call fcn.00401508
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00402d72
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x4016a7
movzx eax, word [ebp - 0x40]
jmp 0x4016aa
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00401130
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x4016c8
push edi
call fcn.0040270c
call fcn.0040272e
jmp 0x4016fa
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00402937
ret
Function at 0x40264b
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x409720], esi
push edi
jne 0x40266b
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 [0x40971c], esi
mov byte [0x409718], al
jne 0x4026d1
mov ecx, dword [0x40aa28]
test ecx, ecx
je 0x4026b2
mov eax, dword [0x40aa24]
sub eax, 4
cmp eax, ecx
jmp 0x4026ab
mov eax, dword [eax]
test eax, eax
je 0x40269d
call eax
mov eax, dword [0x40aa24]
sub eax, 4
cmp eax, dword [0x40aa28]
mov dword [0x40aa24], eax
jae 0x402695
mov eax, 0x409020
mov esi, 0x409028
cmp eax, esi
mov edi, eax
jae 0x4026d1
mov eax, dword [edi]
test eax, eax
je 0x4026ca
call eax
add edi, 4
cmp edi, esi
jb 0x4026c2
mov eax, 0x40902c
mov esi, 0x409030
cmp eax, esi
mov edi, eax
jae 0x4026f0
mov eax, dword [edi]
test eax, eax
je 0x4026e9
call eax
add edi, 4
cmp edi, esi
jb 0x4026e1
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x40270a
push dword [ebp + 8]
mov dword [0x409720], 1
call fcn.004025b1
pop ebp
ret

Function at 0x402a51
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x409040]
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 + 0x409160]
je 0x402a86
inc eax
cmp eax, 0x13
jb 0x402a77
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x409160]
jne 0x402bac
mov eax, dword [0x4096cc]
cmp eax, 1
je 0x402b84
cmp eax, edx
jne 0x402ab6
cmp dword [0x409048], 1
je 0x402b84
cmp ecx, 0xfc
je 0x402bac
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 0x402aec
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00404260
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00402510
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x402b20
mov eax, edi
push eax
call fcn.00402510
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x407298
push edi
call fcn.00403f80
add esp, 0x10
push edi
call fcn.00402510
push dword [esi + 0x409164]
mov ebx, eax
call fcn.00402510
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00403470
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00404260
push edi
push ebx
call fcn.00404270
push 0x407294
push ebx
call fcn.00404270
push dword [esi + 0x409164]
push ebx
call fcn.00404270
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00404160
add esp, 0x2c
jmp 0x402bac
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x409164]
push dword [esi]
call fcn.00402510
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.004014fa
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x403539
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x39c]
sub esp, 0x41c
mov ecx, dword [ebp + 0x3a4]
cmp ecx, dword [0x40a90c]
mov eax, dword [0x409040]
push ebx
push esi
mov dword [ebp + 0x398], eax
push edi
jae 0x4036ff
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x40a920]
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 0x4036ff
xor edi, edi
cmp dword [ebp + 0x3ac], edi
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x7c], edi
jne 0x4035a3
xor eax, eax
jmp 0x403713
test al, 0x20
je 0x4035b4
push 2
push edi
push edi
push ecx
call fcn.00405635
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x403689
cmp dword [ebp + 0x3ac], edi
mov eax, dword [ebp + 0x3a8]
mov dword [ebp - 0x70], eax
mov dword [ebp + 0x3a4], edi
jbe 0x4036d0
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp + 0x3a8]
lea eax, [ebp - 0x6c]
cmp ecx, dword [ebp + 0x3ac]
jae 0x403616
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x403607
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 0x4035e9
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 0x403656
mov eax, dword [ebp - 0x78]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x403662
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp + 0x3a8]
xor edi, edi
cmp eax, dword [ebp + 0x3ac]
jb 0x4035dd
jmp 0x403664
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
xor edi, edi
mov eax, dword [ebp - 0x74]
cmp eax, edi
jne 0x4036fa
cmp dword [ebp + 0x3a4], edi
je 0x4036d0
push 5
pop eax
cmp dword [ebp + 0x3a4], eax
jne 0x4036c2
mov dword [0x4096d8], eax
jmp 0x403706
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 0x4036b4
mov eax, dword [ebp - 0x78]
mov dword [ebp + 0x3a4], edi
mov dword [ebp - 0x74], eax
jmp 0x403664
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
jmp 0x403664
push dword [ebp + 0x3a4]
call fcn.00405520
pop ecx
jmp 0x403710
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x4036e8
mov eax, dword [ebp + 0x3a8]
cmp byte [eax], 0x1a
je 0x40359c
mov dword [0x4096d4], 0x1c
mov dword [0x4096d8], edi
jmp 0x403710
sub eax, dword [ebp - 0x7c]
jmp 0x403713
and dword [0x4096d8], 0
mov dword [0x4096d4], 9
or eax, 0xffffffff
mov ecx, dword [ebp + 0x398]
pop edi
pop esi
pop ebx
call fcn.004014fa
add ebp, 0x39c
leave
ret
Function at 0x404160
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x409868], ebx
push esi
push edi
jne 0x4041e0
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x40421b
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x409868], eax
je 0x40421b
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x40986c], eax
call esi
cmp dword [0x4096e0], 2
mov dword [0x409870], eax
jne 0x4041e0
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x409878], eax
je 0x4041e0
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x409874], eax
mov eax, dword [0x409874]
test eax, eax
je 0x404225
call eax
test eax, eax
je 0x40420c
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x409878]
test eax, eax
je 0x40420c
test byte [ebp - 8], 1
jne 0x404225
cmp dword [0x4096ec], 4
jb 0x40421f
or byte [ebp + 0x12], 0x20
jmp 0x404244
xor eax, eax
jmp 0x404254
or byte [ebp + 0x12], 4
jmp 0x404244
mov eax, dword [0x40986c]
test eax, eax
je 0x404244
call eax
mov ebx, eax
test ebx, ebx
je 0x404244
mov eax, dword [0x409870]
test eax, eax
je 0x404244
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x409868]
pop edi
pop esi
pop ebx
leave
ret