Function at 0x40404d
Capabilities:
Write file on windows

Disassembly:
jmp 0x40bc40
push 0xffffffffffffffff
push 0x5490fb
mov eax, dword fs:[0]
push eax
sub esp, 0x550
mov eax, dword [0x5c1d10]
xor eax, esp
mov dword [esp + 0x54c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5c1d10]
xor eax, esp
push eax
lea eax, [esp + 0x564]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x574]
mov edi, ecx
lea ecx, [esp + 0x14]
mov dword [esp + 0x24], ebp
call fcn.00404bc4
mov dword [esp + 0x56c], 0
push 0x400
lea eax, [esp + 0x164]
push 0
push eax
mov byte [esp + 0x24], 0x22
mov byte [esp + 0x25], 0
call fcn.004f4420
mov eax, dword [edi + 8]
add esp, 0xc
test eax, eax
jne 0x40bcd4
mov ecx, dword [edi + 4]
push ecx
push str.IDD__s
lea edx, [esp + 0x1c]
push edx
jmp 0x40bcdf
push eax
push str.IDD__d
lea eax, [esp + 0x1c]
push eax
call fcn.004012df
mov eax, dword [edi + 0x18]
add esp, 0xc
lea ecx, [edi + 0x10]
lea edx, [esp + 0x14]
push edx
push eax
call fcn.004b1b93
mov eax, str._DIALOG_DISCARDABLE
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40bd00
sub eax, edx
push eax
push str._DIALOG_DISCARDABLE
lea ecx, [esp + 0x1c]
call fcn.00404c0a
movzx eax, word [ebp + 0xa]
test ax, ax
jne 0x40bd39
cmp word [ebp + 0xc], ax
jne 0x40bd39
cmp word [ebp + 0xe], ax
jne 0x40bd39
cmp word [ebp + 0x10], ax
je 0x40bfbe
movzx esi, word [ebp + 0xe]
test si, si
jl 0x40bfbe
movzx edx, word [ebp + 0x10]
test dx, dx
jl 0x40bfbe
test ax, ax
jl 0x40bfbe
movzx ecx, word [ebp + 0xc]
test cx, cx
jl 0x40bfbe
movsx edx, dx
push edx
movsx edx, si
push edx
movsx ecx, cx
movsx edx, ax
push ecx
push edx
lea eax, [esp + 0x48]
push str._i__i__i__i
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x18
lea ecx, [esp + 0x38]
push ecx
lea ecx, [esp + 0x18]
call fcn.00401e1f
push 0x562cc0
lea ecx, [esp + 0x18]
call fcn.00401e1f
mov eax, dword [esp + 0x14]
cmp dword [eax - 4], 1
mov esi, dword [eax - 0xc]
jle 0x40bdc5
mov edx, esi
push edx
lea ecx, [esp + 0x18]
call fcn.00402540
mov eax, dword [esp + 0x14]
mov edx, dword [edi + 0xc]
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea ecx, [esp + 0x20]
push ecx
push esi
push eax
push edx
call ebx
test eax, eax
je 0x40bfb0
mov ecx, dword [ebp]
push 0x400
lea eax, [esp + 0x164]
push eax
push 0x25
push 0x5b9160
push ecx
mov ecx, edi
call fcn.0040214e
push str.STYLE
lea ecx, [esp + 0x18]
call fcn.00402676
lea edx, [esp + 0x160]
push edx
lea ecx, [esp + 0x18]
call fcn.00401e1f
push 0x562cc0
lea ecx, [esp + 0x18]
call fcn.00401e1f
mov eax, dword [esp + 0x14]
mov eax, dword [eax - 0xc]
xor esi, esi
push esi
lea ecx, [esp + 0x20]
push ecx
push eax
lea ecx, [esp + 0x20]
call fcn.004017a8
mov edx, dword [edi + 0xc]
push eax
push edx
call ebx
test eax, eax
jne 0x40be59
push esi
push esi
jmp 0x40bfb4
mov ecx, dword [ebp + 4]
push 0x400
lea eax, [esp + 0x164]
push eax
push 0x15
push 0x5b90b8
push ecx
mov ecx, edi
mov byte [esp + 0x174], 0
call fcn.0040214e
lea eax, [esp + 0x160]
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40be90
sub eax, edx
je 0x40bef0
push str.EXSTYLE
lea ecx, [esp + 0x18]
call fcn.00402676
lea edx, [esp + 0x160]
push edx
lea ecx, [esp + 0x18]
call fcn.00401e1f
push 0x562cc0
lea ecx, [esp + 0x18]
call fcn.00401e1f
mov eax, dword [esp + 0x14]
mov eax, dword [eax - 0xc]
push esi
lea ecx, [esp + 0x20]
push ecx
push eax
lea ecx, [esp + 0x20]
call fcn.004017a8
mov edx, dword [edi + 0xc]
push eax
push edx
call ebx
test eax, eax
je 0x40be52
cmp word [ebp + 0x12], 0
movsx eax, word [ebp + 0xe]
movsx ecx, word [ebp + 0x10]
mov dword [esp + 0x2c], esi
mov dword [esp + 0x28], esi
lea esi, [ebp + 0x12]
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ecx
je 0x40bffe
push str.MENU
lea ecx, [esp + 0x18]
call fcn.00402676
cmp word [esi], 0xffff
jne 0x40bf59
movzx edx, word [esi + 2]
add esi, 2
push edx
lea eax, [esp + 0x3c]
push 0x562d98
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea ecx, [esp + 0x38]
push ecx
lea ecx, [esp + 0x18]
call fcn.00401e1f
add esi, 2
jmp 0x40bf7f
push 0x100
lea edx, [esp + 0x64]
push edx
push esi
mov ecx, edi
call fcn.00404b6f
mov esi, eax
test esi, esi
je 0x40bfbe
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x18]
call fcn.00401e1f
push 0x562cc0
lea ecx, [esp + 0x18]
call fcn.00401e1f
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx - 0xc]
push 0
lea edx, [esp + 0x20]
push edx
push eax
lea ecx, [esp + 0x20]
call fcn.004017a8
push eax
mov eax, dword [edi + 0xc]
push eax
call ebx
test eax, eax
jne 0x40c001
push 0
push 0
push str.Error_Writing_DLG
call fcn.004b468e
mov dword [esp + 0x56c], 0xffffffff
lea ecx, [esp + 0x14]
call fcn.00402798
xor eax, eax
mov ecx, dword [esp + 0x564]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x54c]
xor ecx, esp
call fcn.004f409d
add esp, 0x55c
ret 4
add esi, 2
movzx eax, word [esi]
test ax, ax
je 0x40c029
cmp ax, 0xffff
je 0x40c029
push 0x100
lea ecx, [esp + 0x64]
push ecx
push esi
mov ecx, edi
call fcn.00404b6f
mov esi, eax
test esi, esi
jne 0x40c02c
jmp 0x40bfbe
add esi, 2
cmp word [esi], 0
je 0x40c0c0
push str.CAPTION
lea ecx, [esp + 0x18]
call fcn.00402676
push 0x100
lea edx, [esp + 0x64]
push edx
push esi
mov ecx, edi
call fcn.00404b6f
mov esi, eax
test esi, esi
je 0x40bfbe
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x18]
call fcn.00401e1f
lea ecx, [esp + 0x60]
push ecx
lea ecx, [esp + 0x18]
call fcn.00401e1f
lea edx, [esp + 0x18]
push edx
lea ecx, [esp + 0x18]
call fcn.00401e1f
push 0x562cc0
lea ecx, [esp + 0x18]
call fcn.00401e1f
mov eax, dword [esp + 0x14]
mov eax, dword [eax - 0xc]
push 0
lea ecx, [esp + 0x20]
push ecx
push eax
lea ecx, [esp + 0x20]
call fcn.004017a8
mov edx, dword [edi + 0xc]
push eax
push edx
call ebx
test eax, eax
jne 0x40c0c3
jmp 0x40bfb0
add esi, 2
test byte [ebp], 0x40
je 0x40c196
movzx eax, word [esi]
push eax
lea ecx, [esp + 0x3c]
push str._hu_
push ecx
lea ebp, [esi + 2]
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push str.FONT
lea ecx, [esp + 0x18]
call fcn.00402676
lea edx, [esp + 0x38]
push edx
lea ecx, [esp + 0x18]
call fcn.00401e1f
push 0x100
push ebp
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x40bfbe
push 0x100
lea eax, [esp + 0x64]
push eax
push ebp
mov ecx, edi
call fcn.00404b6f
mov esi, eax
test esi, esi
je 0x40bfbe
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x18]
call fcn.00401e1f
lea edx, [esp + 0x60]
push edx
lea ecx, [esp + 0x18]
call fcn.00401e1f
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x18]
call fcn.00401e1f
push 0x562cc0
lea ecx, [esp + 0x18]
call fcn.00401e1f
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx - 0xc]
push 0
lea edx, [esp + 0x20]
push edx
push eax
lea ecx, [esp + 0x20]
call fcn.004017a8
push eax
mov eax, dword [edi + 0xc]
push eax
call ebx
test eax, eax
je 0x40bfb0
mov ebp, dword [esp + 0x24]
push str.BEGIN_r_n
lea ecx, [esp + 0x18]
call fcn.00402676
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx - 0xc]
push 0
lea edx, [esp + 0x20]
push edx
push eax
lea ecx, [esp + 0x20]
call fcn.004017a8
push eax
mov eax, dword [edi + 0xc]
push eax
call ebx
test eax, eax
je 0x40bfb0
cmp word [ebp + 8], 0
mov dword [esp + 0x20], 0
jbe 0x40c25d
mov ebp, dword [sym.imp.USER32.dll_PtInRect]
add esi, 3
and esi, 0xfffffffc
movsx ecx, word [esi + 0xa]
movsx eax, word [esi + 8]
push ecx
push eax
lea ecx, [esp + 0x30]
push ecx
call ebp
test eax, eax
jne 0x40c234
push str.___Item_not_within_dialog__r_n
lea ecx, [esp + 0x18]
call fcn.00402676
mov edx, dword [esp + 0x14]
mov eax, dword [edx - 0xc]
push 0
lea ecx, [esp + 0x20]
push ecx
push eax
lea ecx, [esp + 0x20]
call fcn.004017a8
mov edx, dword [edi + 0xc]
push eax
push edx
call ebx
test eax, eax
je 0x40bfb0
push esi
mov ecx, edi
call fcn.00404cfa
mov esi, eax
test esi, esi
je 0x40bfbe
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
movzx edx, word [ecx + 8]
add eax, 1
cmp eax, edx
mov dword [esp + 0x20], eax
jb 0x40c1e4
mov dword [esp + 0x56c], 0xffffffff
lea ecx, [esp + 0x14]
call fcn.00402798
mov eax, 1
jmp 0x40bfd4