Function at 0x40b3f0
Capabilities:
Write file on windows

Disassembly:
jmp 0x40b3f0
push 0xffffffffffffffff
push 0x5490ab
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 ebx, dword [esp + 0x574]
mov edi, ecx
lea ecx, [esp + 0x14]
mov dword [esp + 0x20], ebx
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 0x40b484
mov ecx, dword [edi + 4]
push ecx
push str.IDD__s
lea edx, [esp + 0x1c]
push edx
jmp 0x40b48f
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.DIALOGEX
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40b4b0
sub eax, edx
push eax
push str.DIALOGEX
lea ecx, [esp + 0x1c]
call fcn.00404c0a
movsx eax, word [ebx + 0x18]
movsx ecx, word [ebx + 0x16]
movsx edx, word [ebx + 0x14]
push eax
movsx eax, word [ebx + 0x12]
push ecx
push edx
push eax
lea ecx, [esp + 0x48]
push str._i__i__i__i
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [esp + 0x50]
add esp, 0x18
lea ecx, [eax + 1]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x40b4f8
sub eax, ecx
push eax
lea edx, [esp + 0x3c]
push edx
lea ecx, [esp + 0x1c]
call fcn.00404c0a
push 2
push 0x562cc0
lea ecx, [esp + 0x1c]
call fcn.00404c0a
mov eax, dword [esp + 0x14]
mov esi, dword [eax - 0xc]
mov ebp, 1
cmp dword [eax - 4], ebp
jle 0x40b543
mov eax, esi
push eax
lea ecx, [esp + 0x18]
call fcn.00402540
mov eax, dword [esp + 0x14]
mov edx, dword [edi + 0xc]
push 0
lea ecx, [esp + 0x20]
push ecx
push esi
push eax
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40b788
mov ecx, dword [ebx + 0xc]
push 0x400
lea eax, [esp + 0x164]
push eax
push 0x25
push 0x5b9160
push ecx
mov ecx, edi
call fcn.0040214e
mov eax, str.STYLE
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40b585
sub eax, edx
push eax
push str.STYLE
lea ecx, [esp + 0x1c]
call fcn.0040468d
lea eax, [esp + 0x160]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40b5b0
sub eax, edx
push eax
lea edx, [esp + 0x164]
push edx
lea ecx, [esp + 0x1c]
call fcn.00404c0a
push 2
push 0x562cc0
lea ecx, [esp + 0x1c]
call fcn.00404c0a
mov eax, dword [esp + 0x14]
cmp dword [eax - 4], ebp
mov esi, dword [eax - 0xc]
jle 0x40b5f9
mov eax, esi
push eax
lea ecx, [esp + 0x18]
call fcn.00402540
mov eax, dword [esp + 0x14]
mov edx, dword [edi + 0xc]
push 0
lea ecx, [esp + 0x20]
push ecx
push esi
push eax
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40b788
mov ecx, dword [ebx + 8]
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]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40b645
sub eax, edx
je 0x40b6b6
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]
cmp dword [eax - 4], ebp
mov esi, dword [eax - 0xc]
jle 0x40b69b
mov eax, esi
push eax
lea ecx, [esp + 0x18]
call fcn.00402540
mov eax, dword [esp + 0x14]
mov edx, dword [edi + 0xc]
push 0
lea ecx, [esp + 0x20]
push ecx
push esi
push eax
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40b788
movsx eax, word [ebx + 0x16]
movsx ecx, word [ebx + 0x18]
xor ebp, ebp
cmp word [ebx + 0x1a], bp
lea esi, [ebx + 0x1a]
mov dword [esp + 0x28], ebp
mov dword [esp + 0x24], ebp
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ecx
je 0x40b7b1
push str.MENU
lea ecx, [esp + 0x18]
call fcn.00402676
cmp word [esi], 0xffff
jne 0x40b720
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 0x40b746
push 0x100
lea edx, [esp + 0x64]
push edx
push esi
mov ecx, edi
call fcn.00404b6f
mov esi, eax
cmp esi, ebp
je 0x40b796
lea eax, [esp + 0x60]
push eax
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 ebp, dword [eax - 0xc]
jle 0x40b771
mov ecx, ebp
push ecx
lea ecx, [esp + 0x18]
call fcn.00402540
mov eax, dword [esp + 0x14]
push 0
lea edx, [esp + 0x20]
push edx
push ebp
push eax
mov eax, dword [edi + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40b7b4
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
jmp 0x40ba67
add esi, 2
movzx eax, word [esi]
test ax, ax
je 0x40b7dc
cmp ax, 0xffff
je 0x40b7dc
push 0x100
lea ecx, [esp + 0x64]
push ecx
push esi
mov ecx, edi
call fcn.00404b6f
mov esi, eax
test esi, esi
jne 0x40b7df
jmp 0x40b796
add esi, 2
cmp word [esi], 0
je 0x40b873
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 0x40b796
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 dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40b876
jmp 0x40b788
add esi, 2
test byte [ebx + 0xc], 0x40
je 0x40b986
movzx eax, word [esi]
push eax
lea ecx, [esp + 0x3c]
push str._hu_
push ecx
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
lea eax, [esp + 0x64]
push eax
lea ecx, [esi + 6]
push ecx
mov ecx, edi
call fcn.00404b6f
mov ebp, eax
test ebp, ebp
je 0x40b796
lea edx, [esp + 0x18]
push edx
lea ecx, [esp + 0x18]
call fcn.00401e1f
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x18]
call fcn.00401e1f
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x18]
call fcn.00401e1f
push 0x562ce4
lea ecx, [esp + 0x18]
call fcn.00401e1f
movzx edx, word [esi + 2]
push edx
lea eax, [esp + 0x3c]
push 0x562d74
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
cmp word [esi + 4], 0
lea ecx, [esp + 0x14]
je 0x40b942
push str.TRUE
jmp 0x40b947
push str.FALSE
call fcn.00401e1f
push 0x562cc0
lea ecx, [esp + 0x18]
call fcn.00401e1f
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 dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40b988
jmp 0x40b788
mov ebp, esi
push str.BEGIN_r_n
lea ecx, [esp + 0x18]
mov esi, ebp
call fcn.00402676
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 dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40b788
mov eax, dword [esp + 0x20]
xor ebx, ebx
cmp word [eax + 0x10], bx
jbe 0x40ba4e
nop
add esi, 3
and esi, 0xfffffffc
movsx ecx, word [esi + 0xe]
movsx eax, word [esi + 0xc]
push ecx
push eax
lea ecx, [esp + 0x2c]
push ecx
call dword [sym.imp.USER32.dll_PtInRect]
test eax, eax
jne 0x40ba35
push str.___Item_not_within_dialog__r_n
lea ecx, [esp + 0x18]
call fcn.00402676
mov eax, dword [esp + 0x14]
cmp dword [eax - 4], 1
mov ebp, dword [eax - 0xc]
jle 0x40ba1a
mov edx, ebp
push edx
lea ecx, [esp + 0x18]
call fcn.00402540
mov eax, dword [esp + 0x14]
mov edx, dword [edi + 0xc]
push 0
lea ecx, [esp + 0x20]
push ecx
push ebp
push eax
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40b788
push esi
mov ecx, edi
call fcn.00403a71
mov esi, eax
mov eax, dword [esp + 0x20]
movzx ecx, word [eax + 0x10]
add ebx, 1
cmp ebx, ecx
jb 0x40b9d0
mov dword [esp + 0x56c], 0xffffffff
lea ecx, [esp + 0x14]
call fcn.00402798
mov eax, 1
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