Function at 0x40e080
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x344
push ebx
push ebp
mov ebp, dword [esp + 0x350]
push esi
mov eax, ebp
call fcn.0040f970
push edi
mov edx, ecx
mov ebx, str.Btn_03u
mov dword [esp + 0x10], eax
call fcn.0040bcb0
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
mov esi, eax
add esp, 4
and esi, 1
test ebp, 0x8000
mov ebp, dword [sym.imp.KERNEL32.dll_lstrlenA]
jne 0x40e101
mov eax, dword [esp + 0xc]
mov ecx, dword [eax + 8]
push ecx
push str.Position
lea edx, [esp + 0x38]
push str._s_d_r_n
push edx
call ebx
add esp, 0x10
lea eax, [esp + 0x30]
push eax
call ebp
push 0
lea ecx, [esp + 0x14]
push ecx
push eax
lea edx, [esp + 0x3c]
push edx
push edi
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
and esi, eax
mov eax, dword [esp + 0xc]
mov ecx, dword [eax + 0xc]
push ecx
push str.Type
lea edx, [esp + 0x38]
push str._s_08x_r_n
push edx
call ebx
add esp, 0x10
lea eax, [esp + 0x30]
push eax
call ebp
push 0
lea ecx, [esp + 0x14]
push ecx
push eax
lea edx, [esp + 0x3c]
push edx
push edi
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [esp + 0xc]
and esi, eax
push str.Name
add ecx, 0x10
push edi
or eax, 0xffffffff
call fcn.0040bda0
and esi, eax
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 0xc]
and ecx, 0xffff
add esp, 8
cmp ecx, 6
jne 0x40e1c4
mov edx, dword [0x41a2d4]
mov eax, dword [0x41a2d0]
xor ecx, ecx
cmp edx, eax
jge 0x40e1dd
mov eax, dword [edx*4 + 0x41a140]
test eax, eax
je 0x40e18f
mov dword [esp + 0x14], eax
mov ecx, 1
inc edx
test ecx, ecx
mov dword [0x41a2d4], edx
je 0x40e1dd
mov eax, dword [esp + 0x14]
push str.File
push edi
call fcn.0040bed0
mov edx, dword [esp + 0x1c]
add esp, 8
push edx
push 0
and esi, eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x40e1dd
lea ecx, [eax + 0x147]
push str.File
push edi
or eax, 0xffffffff
call fcn.0040bda0
add esp, 8
and esi, eax
mov ecx, dword [esp + 0xc]
push str.Parameter
add ecx, 0x24b
push edi
or eax, 0xffffffff
call fcn.0040bda0
mov ecx, dword [esp + 0x14]
and esi, eax
push str.Directory
add ecx, 0x34f
push edi
or eax, 0xffffffff
call fcn.0040bda0
and esi, eax
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 0x454]
push ecx
push str.WindowStat
lea edx, [esp + 0x48]
push str._s_d_r_n
push edx
call ebx
add esp, 0x20
lea eax, [esp + 0x30]
push eax
call ebp
push 0
lea ecx, [esp + 0x14]
push ecx
push eax
lea edx, [esp + 0x3c]
push edx
push edi
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
and esi, eax
mov eax, dword [esp + 0xc]
mov ecx, dword [eax + 0x45c]
push ecx
push str.Flag
lea edx, [esp + 0x38]
push str._s_08x_r_n
push edx
call ebx
add esp, 0x10
lea eax, [esp + 0x30]
push eax
call ebp
push 0
lea ecx, [esp + 0x14]
push ecx
push eax
lea edx, [esp + 0x3c]
push edx
push edi
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [esp + 0xc]
and esi, eax
push 0x417658
add ecx, 0x43
push edi
or eax, 0xffffffff
call fcn.0040bda0
and esi, eax
mov eax, dword [esp + 0x14]
movzx ecx, word [eax + 0x458]
push ecx
push str.Keyboard
lea edx, [esp + 0x40]
push str._s_04x_r_n
push edx
call ebx
add esp, 0x18
lea eax, [esp + 0x30]
push eax
call ebp
push 0
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], eax
push ecx
push eax
lea edx, [esp + 0x3c]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
and esi, eax
mov eax, dword [esp + 0xc]
mov ecx, dword [eax + 0xc]
and ecx, 0xffff
cmp ecx, 0x10
jne 0x40e33b
mov edx, dword [eax + 0x464]
push edx
push str.SubMenuIdx
lea eax, [esp + 0x38]
push str._s_d_r_n
push eax
call ebx
add esp, 0x10
lea ecx, [esp + 0x30]
push ecx
call ebp
push 0
lea edx, [esp + 0x14]
push edx
push eax
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x3c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
and esi, eax
mov eax, dword [esp + 0xc]
mov ecx, dword [eax + 0x468]
test ecx, ecx
je 0x40e35c
push str.RehookTrigger
push edi
or eax, 0xffffffff
call fcn.0040bda0
add esp, 8
and esi, eax
mov eax, dword [esp + 0xc]
mov ecx, dword [eax + 0x46c]
test ecx, ecx
je 0x40e3ba
push str.IconFile
push edi
or eax, 0xffffffff
call fcn.0040bda0
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx + 0x470]
push edx
push str.IconIndex
and esi, eax
lea eax, [esp + 0x40]
push str._s_d_r_n
push eax
call ebx
add esp, 0x18
lea ecx, [esp + 0x30]
push ecx
call ebp
push 0
lea edx, [esp + 0x14]
push edx
push eax
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x3c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
and esi, eax
mov eax, dword [esp + 0xc]
mov ecx, dword [eax + 0x47c]
test ecx, ecx
je 0x40e60d
push str.OverlayIcon
push edi
or eax, 0xffffffff
call fcn.0040bda0
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx + 0x480]
push edx
push str.OverlayIdx
and esi, eax
lea eax, [esp + 0x40]
push str._s_d_r_n
push eax
call ebx
add esp, 0x18
lea ecx, [esp + 0x30]
push ecx
call ebp
push 0
lea edx, [esp + 0x14]
push edx
push eax
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x3c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [esp + 0xc]
and esi, eax
mov ecx, 1
add edx, 0x488
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], 2
jmp 0x40e440
mov ecx, dword [esp + 0x18]
lea ecx, [ecx]
test ecx, ecx
mov eax, dword [esp + 0x14]
mov edx, dword [eax - 4]
mov dword [esp + 0x20], edx
mov eax, str.Overlay_dSize
jl 0x40e46a
push ecx
push eax
lea eax, [esp + 0x290]
push eax
call ebx
add esp, 0xc
lea eax, [esp + 0x288]
mov ecx, dword [esp + 0x20]
push ecx
push eax
lea edx, [esp + 0x38]
push str._s_d_r_n
push edx
call ebx
add esp, 0x10
lea eax, [esp + 0x30]
push eax
call ebp
push 0
lea ecx, [esp + 0x30]
push ecx
push eax
lea edx, [esp + 0x3c]
push edx
push edi
mov dword [esp + 0x40], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
and esi, eax
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x18]
test ecx, ecx
mov eax, str.Overlay_dBasePos
jl 0x40e4cd
push ecx
push eax
lea edx, [esp + 0x2f4]
push edx
call ebx
add esp, 0xc
lea eax, [esp + 0x2ec]
mov ecx, dword [esp + 0x20]
push ecx
push eax
lea edx, [esp + 0x22c]
push str._s_d_r_n
push edx
call ebx
add esp, 0x10
lea eax, [esp + 0x224]
push eax
call ebp
push 0
lea ecx, [esp + 0x28]
push ecx
push eax
lea edx, [esp + 0x230]
push edx
push edi
mov dword [esp + 0x38], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
and esi, eax
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 4]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x18]
test ecx, ecx
mov eax, str.Overlay_dOffsetX
jl 0x40e53a
push ecx
push eax
lea edx, [esp + 0x1c8]
push edx
call ebx
add esp, 0xc
lea eax, [esp + 0x1c0]
mov ecx, dword [esp + 0x20]
push ecx
push eax
lea edx, [esp + 0x100]
push str._s_d_r_n
push edx
call ebx
add esp, 0x10
lea eax, [esp + 0xf8]
push eax
call ebp
push 0
lea ecx, [esp + 0x2c]
push ecx
push eax
lea edx, [esp + 0x104]
push edx
push edi
mov dword [esp + 0x3c], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
and esi, eax
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 8]
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x18]
test ecx, ecx
mov eax, str.Overlay_dOffsetY
jl 0x40e5a7
push ecx
push eax
lea edx, [esp + 0x164]
push edx
call ebx
add esp, 0xc
lea eax, [esp + 0x15c]
mov ecx, dword [esp + 0x20]
push ecx
push eax
lea edx, [esp + 0x9c]
push str._s_d_r_n
push edx
call ebx
add esp, 0x10
lea eax, [esp + 0x94]
push eax
call ebp
push 0
lea ecx, [esp + 0x20]
push ecx
push eax
lea edx, [esp + 0xa0]
push edx
push edi
mov dword [esp + 0x30], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
and esi, eax
mov eax, dword [esp + 0x10]
inc edx
add ecx, 0x14
dec eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], eax
jne 0x40e439
mov eax, dword [esp + 0xc]
mov eax, dword [eax + 0x4ac]
test eax, eax
jle 0x40e79d
push eax
push str.ChainBoot
lea eax, [esp + 0x9c]
push str._s_d_r_n
push eax
call ebx
add esp, 0x10
lea ecx, [esp + 0x94]
push ecx
call ebp
push 0
lea edx, [esp + 0x20]
push edx
push eax
mov dword [esp + 0x28], eax
lea eax, [esp + 0xa0]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [esp + 0xc]
and esi, eax
mov eax, dword [ecx + 0x4ac]
xor edx, edx
cmp eax, edx
mov dword [esp + 0x14], edx
jle 0x40e79d
mov dword [esp + 0x18], edx
jmp 0x40e680
mov edx, dword [esp + 0x18]
lea esp, [esp]
mov eax, dword [esp + 0xc]
mov ecx, dword [eax + 0x4b0]
movzx eax, word [ecx + edx + 4]
add ecx, edx
movzx ecx, word [ecx]
shl ecx, 0x10
or eax, ecx
test edx, edx
mov dword [esp + 0x1c], eax
mov ecx, str.Chain_03u
jl 0x40e6c4
mov edx, dword [esp + 0x14]
push edx
push ecx
lea eax, [esp + 0x164]
push eax
call ebx
mov eax, dword [esp + 0x28]
add esp, 0xc
lea ecx, [esp + 0x15c]
push eax
push ecx
lea ecx, [esp + 0x9c]
push str._s_08x_r_n
push ecx
call ebx
add esp, 0x10
lea edx, [esp + 0x94]
push edx
call ebp
push 0
lea ecx, [esp + 0x2c]
push ecx
push eax
lea edx, [esp + 0xa0]
push edx
push edi
mov dword [esp + 0x3c], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [esp + 0x18]
and esi, eax
test ecx, ecx
mov eax, dword [esp + 0xc]
mov edx, dword [eax + 0x4b0]
mov eax, dword [ecx + edx + 8]
mov dword [esp + 0x1c], eax
mov eax, str.Chain_03uDelay
jl 0x40e738
mov ecx, dword [esp + 0x14]
push ecx
push eax
lea edx, [esp + 0x1c8]
push edx
call ebx
add esp, 0xc
lea eax, [esp + 0x1c0]
mov ecx, dword [esp + 0x1c]
push ecx
push eax
lea edx, [esp + 0x100]
push str._s_d_r_n
push edx
call ebx
add esp, 0x10
lea eax, [esp + 0xf8]
push eax
call ebp
push 0
lea ecx, [esp + 0x28]
push ecx
push eax
lea edx, [esp + 0x104]
push edx
push edi
mov dword [esp + 0x38], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [esp + 0x18]
add ecx, 0x10
and esi, eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0xc]
mov edx, dword [ecx + 0x4ac]
inc eax
cmp eax, edx
mov dword [esp + 0x14], eax
jl 0x40e678
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x344
ret