joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401870
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
mov ebx, ecx
push esi
push edi
cmp dword [ebx + 0x38], 0
je 0x40189c
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const___long_long___int64__]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x20]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x20], esi
mov ecx, dword [eax]
lea eax, [ebx + 0x30]
mov dword [esp + 0x24], edi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
test ecx, ecx
je 0x4018c4
mov eax, dword [eax]
mov ecx, dword [eax]
jmp 0x4018ca
xor ecx, ecx
mov dword [esp + 0x18], eax
mov eax, ecx
cdq
mov dword [esp + 0x10], eax
mov ecx, edx
mov dword [esp + 0x14], ecx
test edi, edi
jl 0x401932
jg 0x4018e1
test esi, esi
je 0x401932
test ecx, ecx
jl 0x40192d
jg 0x4018eb
test eax, eax
je 0x40192d
cmp edi, ecx
jg 0x4018ff
jl 0x4018f5
cmp esi, eax
jae 0x4018ff
mov eax, esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], edi
push eax
push dword [ebp + 8]
push dword [esp + 0x24]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x24]
add esp, 0xc
mov edx, dword [esp + 0x10]
mov ecx, dword [ebp + 8]
add ecx, edx
sub esi, edx
mov eax, dword [eax]
sbb edi, dword [esp + 0x14]
sub dword [eax], edx
mov eax, dword [ebx + 0x20]
add dword [eax], edx
jmp 0x401935
mov ecx, dword [ebp + 8]
jmp 0x40193f
mov ecx, dword [ebp + 8]
test edi, edi
jl 0x401959
jg 0x40193f
test esi, esi
je 0x401959
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x401959
push eax
push esi
push 1
push ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x401970
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 4], esi
test eax, eax
jg 0x40199c
jl 0x401990
test ecx, ecx
jne 0x40199c
pop esi
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x4019b5
push eax
push ecx
push esi
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char___long_long___int64__]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x1c]
push edi
mov edi, ecx
mov eax, dword [eax]
mov dword [ebp - 8], eax
test eax, eax
je 0x401a03
mov eax, dword [ebx + 0x2c]
lea edx, [ebx + 0x2c]
mov dword [ebp - 0xc], edx
mov eax, dword [eax]
test eax, eax
je 0x401a09
mov edi, dword [ebp - 4]
cmp eax, ecx
mov esi, ecx
cmovb esi, eax
push esi
push dword [ebp - 8]
push edi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x2c]
add edi, esi
mov dword [ebp - 4], edi
add esp, 0xc
mov edi, dword [ebp + 0xc]
sub edi, esi
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov esi, dword [ebp - 4]
jmp 0x401a09
lea eax, [ebx + 0x2c]
mov dword [ebp - 0xc], eax
cmp dword [ebx + 0x4c], 0
je 0x401a76
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x401a32
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 0x54]
mov ecx, dword [ebx + 0x50]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
mov dword [eax], edx
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp edi, 0xfff
jbe 0x401a64
nop
push dword [ebx + 0x4c]
push 0xfff
push 1
push esi
call eax
add esp, 0x10
add esi, eax
sub edi, eax
cmp eax, 0xfff
jne 0x401a76
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x401a40
test edi, edi
je 0x401a76
push dword [ebx + 0x4c]
push edi
push 1
push esi
call eax
add esp, 0x10
sub edi, eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
pop edi
pop esi
sbb edx, 0
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x401df0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x40a014]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x401e20
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040484b
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
push edi
mov ecx, dword [eax]
test ecx, ecx
je 0x401e5c
mov edx, dword [esi + 0x30]
mov edi, dword [edx]
lea eax, [edi + ecx]
cmp ecx, eax
jae 0x401e5c
lea ecx, [edi - 1]
mov eax, ebx
mov dword [edx], ecx
mov edx, dword [esi + 0x20]
pop edi
mov esi, dword [edx]
lea ecx, [esi + 1]
mov dword [edx], ecx
mov byte [esi], bl
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040484b
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
je 0x401f33
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x401e84
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
sub edx, ecx
mov dword [edi], ecx
mov eax, dword [esi + 0x1c]
mov dword [eax], ecx
mov eax, dword [esi + 0x2c]
mov dword [eax], edx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x401e90
movsx eax, bl
jmp 0x401ec8
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x25], bl
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x25]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet___char_const___char_const___char_const____char___char___char___const]
sub eax, 0
je 0x401ef2
sub eax, 1
je 0x401ef2
sub eax, 2
jne 0x401f33
movsx eax, byte [ebp - 0x25]
push dword [esi + 0x4c]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmove ebx, ecx
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040484b
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x401f10
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x401f33
lea ecx, [ebp - 0x25]
mov byte [esi + 0x3d], 1
or eax, 0xffffffff
cmp dword [ebp - 0x30], ecx
pop edi
pop esi
cmovne eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040484b
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040484b
mov esp, ebp
pop ebp
ret 4
Function at 0x402130
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x40a014]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x4021ec
cmp byte [esi + 0x3d], 0
je 0x4021ec
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x4021da
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, 0
je 0x4021a1
sub eax, 1
je 0x4021a5
sub eax, 2
jne 0x4021da
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040484b
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x4021c3
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x4021da
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040484b
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040484b
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.0040484b
mov esp, ebp
pop ebp
ret
Function at 0x403420
Capabilities:
Inspect load icon resource

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x405796
mov eax, dword fs:[0]
push eax
sub esp, 0xe8
mov eax, dword [0x40a014]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 8
push eax
mov dword [ebp - 0x14], 0xff
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
mov ecx, edi
call dword [sym.imp.mfc140u.dll_CWinApp::InitInstance]
push 0
call dword [sym.imp.mfc140u.dll_AfxEnableControlContainer]
push 0xc
call dword [sym.imp.mfc140u.dll_operator]
add esp, 8
mov dword [ebp - 0xf4], eax
mov dword [ebp - 4], 0
test eax, eax
je 0x4034ad
xorps xmm0, xmm0
mov ecx, eax
movq qword [eax], xmm0
mov dword [eax + 8], 0
call dword [sym.imp.mfc140u.dll_CShellManager::CShellManager]
mov esi, eax
jmp 0x4034af
xor esi, esi
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.mfc140u.dll_CMFCVisualManagerWindows::GetRuntimeClass]
push eax
call dword [sym.imp.mfc140u.dll_CMFCVisualManager::SetDefaultManager]
push 0x40683c
mov ecx, edi
call dword [sym.imp.mfc140u.dll_CWinApp::SetRegistryKey]
push 0xd8
lea eax, [ebp - 0xf0]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0xf0]
push 0
push 0x66
call dword [sym.imp.mfc140u.dll_CDialogEx::CDialogEx]
mov dword [ebp - 4], 1
mov dword [ebp - 0xf0], 0x406c3c
call dword [sym.imp.mfc140u.dll_AfxGetModuleState]
push 0x80
push 0xe
push 0x80
call dword [sym.imp.mfc140u.dll_AfxFindResourceHandle]
push eax
call dword [sym.imp.USER32.dll_LoadIconW]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0xf0]
mov dword [ebp - 4], 2
mov ecx, eax
mov dword [edi + 0x20], eax
call dword [sym.imp.mfc140u.dll_CDialog::DoModal]
test esi, esi
je 0x40354e
mov eax, dword [esi]
mov ecx, esi
push 1
call dword [eax + 4]
lea ecx, [ebp - 0x30]
call dword [sym.imp.mfc140u.dll_CDialogImpl::CDialogImpl]
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x3c], vtable.CBrush.0
call fcn.004036d0
lea ecx, [ebp - 0xf0]
call dword [sym.imp.mfc140u.dll_CDialog::CDialog]
xor eax, eax
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.0040484b
mov esp, ebp
pop ebp
ret

Function at 0x404dc3
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x404e02
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x404e02
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x404e02
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x404e02
cmp dword [ecx + 0x74], 0xe
jbe 0x404e02
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x401000
Capabilities:
Read .ini file
Write file on windows

Disassembly:
sub esp, 0x808
mov eax, dword [0x409040]
push str.c:_templava.ini
push 0
push str.removeservice
push 0x40712c
mov dword [esp + 0x814], eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
test eax, eax
je 0x4010cc
mov eax, dword [esp + 0x80c]
test eax, eax
je 0x4010cc
cmp byte [eax], 0
je 0x4010cc
push esi
push 0
push 0x80
push 4
push 0
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x4010cb
push 2
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
call fcn.00401540
mov ecx, dword [esp + 0x818]
lea eax, [esp + 0x81c]
push eax
push ecx
lea edx, [esp + 0x14]
push 0x800
push edx
call fcn.004014ea
lea eax, [esp + 0x1c]
add esp, 0x14
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4010a7
push 0
lea ecx, [esp + 8]
push ecx
sub eax, edx
push eax
lea edx, [esp + 0x14]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
mov ecx, dword [esp + 0x804]
call fcn.004015aa
add esp, 0x808
ret

Function at 0x4010e0
Capabilities:
Delete service
Modify service
Read .ini file
Write file on windows

Disassembly:
push edi
mov edi, dword [esp + 8]
test edi, edi
je 0x401140
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x401142
push esi
mov esi, dword [esp + 0x10]
test esi, esi
je 0x40113f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DeleteService_error_errorcode_d__n
push str.c:_temp_rmsvr.log
call fcn.00401000
push str.ChangeServiceConfig___n
push str.c:_temp_rmsvr.log
call fcn.00401000
add esp, 0x14
push 0
push 0
push 0
push 0
push 0
push 0
push esi
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0xffffffffffffffff
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigA]
pop esi
pop edi
ret
pop edi
mov dword [esp + 8], str.DeleteService_OK__n
mov dword [esp + 4], str.c:_temp_rmsvr.log
jmp fcn.00401000
Function at 0x4015b8
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4015d8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00402718
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x4015f9
test byte [esp + 8], 2
je 0x4015f9
mov dword [0x4096d0], 0xd
mov dword [0x4096d4], 5
jmp 0x4015d4
xor eax, eax
ret

Function at 0x401692
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x4073d8
call fcn.00402428
mov edi, 0x94
mov eax, edi
call fcn.00401630
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 [0x4096dc], ecx
mov eax, dword [esi + 4]
mov dword [0x4096e8], eax
mov edx, dword [esi + 8]
mov dword [0x4096ec], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x4096e0], esi
cmp ecx, 2
je 0x4016f2
or esi, 0x8000
mov dword [0x4096e0], esi
shl eax, 8
add eax, edx
mov dword [0x4096e4], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x40172d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40172d
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x401745
cmp eax, 0x20b
je 0x401732
mov dword [ebp - 0x1c], esi
jmp 0x401759
cmp dword [ecx + 0x84], 0xe
jbe 0x40172d
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x401753
cmp dword [ecx + 0x74], 0xe
jbe 0x40172d
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push esi
call fcn.00403139
pop ecx
test eax, eax
jne 0x401785
cmp dword [0x4096c8], 1
jne 0x401772
call fcn.004028ee
push 0x1c
call fcn.00402777
push 0xff
call fcn.0040257d
pop ecx
pop ecx
call fcn.00403097
mov dword [ebp - 4], esi
call fcn.00402eec
test eax, eax
jge 0x40179e
push 0x1b
call fcn.0040166d
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x40ac74], eax
call fcn.00402dca
mov dword [0x4096c0], eax
call fcn.00402d28
test eax, eax
jge 0x4017c4
push 8
call fcn.0040166d
pop ecx
call fcn.00402af5
test eax, eax
jge 0x4017d5
push 9
call fcn.0040166d
pop ecx
push 1
call fcn.004025ad
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x4017eb
push eax
call fcn.0040166d
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00402a98
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x40180c
movzx eax, word [ebp - 0x40]
jmp 0x40180f
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.004014e0
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x40182d
push edi
call fcn.004026d8
call fcn.004026fa
jmp 0x40185f
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.00402463
ret
Function at 0x402617
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
xor esi, esi
inc esi
cmp dword [0x40971c], esi
push edi
jne 0x402637
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 [0x409718], esi
mov byte [0x409714], al
jne 0x40269d
mov ecx, dword [0x40ac68]
test ecx, ecx
je 0x40267e
mov eax, dword [0x40ac64]
sub eax, 4
cmp eax, ecx
jmp 0x402677
mov eax, dword [eax]
test eax, eax
je 0x402669
call eax
mov eax, dword [0x40ac64]
sub eax, 4
cmp eax, dword [0x40ac68]
mov dword [0x40ac64], eax
jae 0x402661
mov eax, 0x409020
mov esi, 0x409028
cmp eax, esi
mov edi, eax
jae 0x40269d
mov eax, dword [edi]
test eax, eax
je 0x402696
call eax
add edi, 4
cmp edi, esi
jb 0x40268e
mov eax, 0x40902c
mov esi, 0x409030
cmp eax, esi
mov edi, eax
jae 0x4026bc
mov eax, dword [edi]
test eax, eax
je 0x4026b5
call eax
add edi, 4
cmp edi, esi
jb 0x4026ad
cmp dword [ebp + 0x10], 0
pop edi
pop esi
jne 0x4026d6
push dword [ebp + 8]
mov dword [0x40971c], 1
call fcn.0040257d
pop ebp
ret

Function at 0x402777
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 + 0x4091c8]
je 0x4027ac
inc eax
cmp eax, 0x13
jb 0x40279d
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x4091c8]
jne 0x4028d2
mov eax, dword [0x4096c8]
cmp eax, 1
je 0x4028aa
cmp eax, edx
jne 0x4027dc
cmp dword [0x409054], 1
je 0x4028aa
cmp ecx, 0xfc
je 0x4028d2
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 0x402812
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.00403880
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.00403570
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x402846
mov eax, edi
push eax
call fcn.00403570
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x407494
push edi
call fcn.00403980
add esp, 0x10
push edi
call fcn.00403570
push dword [esi + 0x4091cc]
mov ebx, eax
call fcn.00403570
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00401630
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.00403880
push edi
push ebx
call fcn.00403890
push 0x407490
push ebx
call fcn.00403890
push dword [esi + 0x4091cc]
push ebx
call fcn.00403890
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00403785
add esp, 0x2c
jmp 0x4028d2
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x4091cc]
push dword [esi]
call fcn.00403570
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.004015aa
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x403216
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x39c]
sub esp, 0x41c
mov ecx, dword [ebp + 0x3a4]
cmp ecx, dword [0x40ab4c]
mov eax, dword [0x409040]
push ebx
push esi
mov dword [ebp + 0x398], eax
push edi
jae 0x4033dc
mov eax, ecx
sar eax, 5
lea ebx, [eax*4 + 0x40ab60]
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 0x4033dc
xor edi, edi
cmp dword [ebp + 0x3ac], edi
mov dword [ebp - 0x74], edi
mov dword [ebp - 0x7c], edi
jne 0x403280
xor eax, eax
jmp 0x4033f0
test al, 0x20
je 0x403291
push 2
push edi
push edi
push ecx
call fcn.004051c6
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x403366
cmp dword [ebp + 0x3ac], edi
mov eax, dword [ebp + 0x3a8]
mov dword [ebp - 0x70], eax
mov dword [ebp + 0x3a4], edi
jbe 0x4033ad
mov ecx, dword [ebp - 0x70]
sub ecx, dword [ebp + 0x3a8]
lea eax, [ebp - 0x6c]
cmp ecx, dword [ebp + 0x3ac]
jae 0x4032f3
mov edx, dword [ebp - 0x70]
inc dword [ebp - 0x70]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x4032e4
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 0x4032c6
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 0x403333
mov eax, dword [ebp - 0x78]
add dword [ebp - 0x74], eax
cmp eax, edi
jl 0x40333f
mov eax, dword [ebp - 0x70]
sub eax, dword [ebp + 0x3a8]
xor edi, edi
cmp eax, dword [ebp + 0x3ac]
jb 0x4032ba
jmp 0x403341
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
xor edi, edi
mov eax, dword [ebp - 0x74]
cmp eax, edi
jne 0x4033d7
cmp dword [ebp + 0x3a4], edi
je 0x4033ad
push 5
pop eax
cmp dword [ebp + 0x3a4], eax
jne 0x40339f
mov dword [0x4096d4], eax
jmp 0x4033e3
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 0x403391
mov eax, dword [ebp - 0x78]
mov dword [ebp + 0x3a4], edi
mov dword [ebp - 0x74], eax
jmp 0x403341
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0x3a4], eax
jmp 0x403341
push dword [ebp + 0x3a4]
call fcn.00402718
pop ecx
jmp 0x4033ed
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x4033c5
mov eax, dword [ebp + 0x3a8]
cmp byte [eax], 0x1a
je 0x403279
mov dword [0x4096d0], 0x1c
mov dword [0x4096d4], edi
jmp 0x4033ed
sub eax, dword [ebp - 0x7c]
jmp 0x4033f0
and dword [0x4096d4], 0
mov dword [0x4096d0], 9
or eax, 0xffffffff
mov ecx, dword [ebp + 0x398]
pop edi
pop esi
pop ebx
call fcn.004015aa
add ebp, 0x39c
leave
ret
Function at 0x403785
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x409838], ebx
push esi
push edi
jne 0x403805
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x403840
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x409838], eax
je 0x403840
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x40983c], eax
call esi
cmp dword [0x4096dc], 2
mov dword [0x409840], eax
jne 0x403805
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x409848], eax
je 0x403805
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x409844], eax
mov eax, dword [0x409844]
test eax, eax
je 0x40384a
call eax
test eax, eax
je 0x403831
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x409848]
test eax, eax
je 0x403831
test byte [ebp - 8], 1
jne 0x40384a
cmp dword [0x4096e8], 4
jb 0x403844
or byte [ebp + 0x12], 0x20
jmp 0x403869
xor eax, eax
jmp 0x403879
or byte [ebp + 0x12], 4
jmp 0x403869
mov eax, dword [0x40983c]
test eax, eax
je 0x403869
call eax
mov ebx, eax
test ebx, ebx
je 0x403869
mov eax, dword [0x409840]
test eax, eax
je 0x403869
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x409838]
pop edi
pop esi
pop ebx
leave
ret