Function at 0x4029b3
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push esi
push edi
push ebx
mov esi, 0x38f90301
mov ecx, esi
shr ecx, 3
movzx edi, cx
cmp esi, 0x38f90300
jne 0x4029f3
mov edx, edi
xor edx, edx
and edx, edi
push edx
mov eax, esi
sub eax, edi
sub eax, edi
push eax
mov edx, edi
imul edx, edx
push edx
mov ecx, edi
or ecx, 0x2600
imul ecx, esi
push ecx
call ebx
mov edx, edi
add edx, esi
sub edx, 0x38f92361
push edx
push 0
push 0
mov eax, edi
sub eax, esi
add eax, 0x38f8e2a1
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CompareStringA]
movzx edi, ax
mov ecx, edi
test cx, cx
je 0x402a26
call dword [sym.imp.MSVCRT.dll__except_handler3]
mov eax, edi
imul eax, eax, 0x711248c0
mov byte [ebp - 4], al
cmp esi, 0x38f90301
jle 0x402a3f
call dword [sym.imp.MSVCRT.dll_setbuf]
mov ecx, edi
and ecx, 0x42000000
movzx edi, cx
cmp edi, 0
jge 0x402a5e
mov ecx, edi
movzx edx, byte [ebp - 4]
and ecx, edx
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalReAlloc]
mov eax, edi
xor eax, 0x6b492c53
sub eax, edi
mov esi, eax
cmp edi, 0
jle 0x402a8a
mov ecx, esi
and ecx, ecx
push ecx
mov edx, esi
imul edx, edx, 0x7dc8
push edx
mov eax, edi
add eax, 0xa00
push eax
call dword [sym.imp.MSVCRT.dll__initterm]
mov ecx, esi
movzx eax, byte [ebp - 4]
or ecx, eax
sub ecx, 0x6b492c53
push ecx
movzx eax, byte [ebp - 4]
sub eax, esi
sub eax, 0x94b6d3ad
push eax
push 0
movzx ecx, byte [ebp - 4]
imul ecx, esi
push ecx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CompareStringA]
mov esi, eax
test esi, esi
je 0x402ac5
call dword [sym.imp.MSVCRT.dll__except_handler3]
movzx eax, byte [ebp - 4]
xor eax, edi
add eax, 0x13f24682
mov edx, 0x13b2c732
xor edx, eax
mov dword [ebp - 8], edx
movzx eax, byte [ebp - 4]
or eax, edi
and eax, esi
mov esi, eax
mov ecx, edi
and ecx, esi
sub ecx, 0xb168d625
mov edx, 0x4ed2a9d7
xor edx, ecx
mov dword [ebp - 0xc], edx
mov ecx, esi
movzx eax, byte [ebp - 4]
imul ecx, eax
mov word [ebp - 0x10], cx
cmp word [ebp - 0x10], 0xffff
jne 0x402b12
call dword [sym.imp.MSVCRT.dll_is_wctype]
mov edx, edi
test dx, dx
je 0x402b23
movzx edx, byte [ebp - 4]
imul edx, edx
push edx
call ebx
cmp esi, 0xffffffff
jne 0x402b33
movzx ecx, word [ebp - 0x10]
mov eax, ecx
jmp 0x402ffe
movzx eax, word [ebp - 0x10]
sub eax, edi
push eax
movzx ecx, word [ebp - 0x10]
and ecx, edi
push ecx
push 0
movzx ecx, byte [ebp - 4]
add ecx, edi
push ecx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CompareStringA]
mov byte [ebp - 4], al
mov dl, byte [ebp - 4]
test dl, dl
je 0x402b64
call dword [sym.imp.MSVCRT.dll__except_handler3]
movzx edx, word [ebp - 0x10]
and edx, edi
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx + edx*4]
mov dword [ebp - 0x14], eax
movzx edx, byte [ebp - 4]
or edx, 0x1ba0000
mov ecx, esi
add ecx, edx
mov dword [ebp - 0x18], ecx
movzx ecx, word [ebp - 0x10]
or ecx, edi
push ecx
movzx ecx, byte [ebp - 4]
imul ecx, dword [ebp - 0x18]
push ecx
push 0
mov edx, dword [ebp - 0x18]
imul edx, edi
push edx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CompareStringA]
mov word [ebp - 0x10], ax
mov ax, word [ebp - 0x10]
test ax, ax
je 0x402bba
call dword [sym.imp.MSVCRT.dll__except_handler3]
mov edx, esi
movzx eax, byte [ebp - 4]
or edx, eax
add edx, 1
mov dword [ebp - 0x1c], edx
mov eax, esi
xor edx, edx
div dword [ebp - 0x18]
mov word [ebp - 0x10], ax
mov cl, byte [ebp - 4]
test cl, cl
je 0x402bef
movzx edx, word [ebp - 0x10]
push edx
mov eax, esi
movzx edx, word [ebp - 0x10]
and eax, edx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetThreadAffinityMask]
mov eax, dword [ebp - 0x18]
movzx ecx, byte [ebp - 4]
add eax, ecx
add eax, 0xfe460000
push eax
mov eax, esi
movzx ecx, byte [ebp - 4]
and eax, ecx
push eax
push 0
movzx eax, word [ebp - 0x10]
and eax, edi
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CompareStringA]
mov esi, eax
test esi, esi
je 0x402c26
call dword [sym.imp.MSVCRT.dll__except_handler3]
movzx edx, word [ebp - 0x10]
or edx, esi
cmp dword [ebp - 0x1c], edx
je 0x402f2b
mov dword [ebp - 0x20], 0x7b34
mov edx, dword [ebp - 0x20]
shl edx, 0x10
mov word [ebp - 0x24], dx
cmp word [ebp - 0x24], 0xffff
jne 0x402c72
push dword [ebp - 0x20]
movzx ecx, word [ebp - 0x24]
or ecx, 0x80e
movzx eax, word [ebp - 0x24]
sub eax, ecx
push eax
movzx eax, word [ebp - 0x24]
or eax, dword [ebp - 0x20]
add eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.USER32.dll_GetSystemMetrics]
mov eax, dword [ebp - 0x20]
or eax, eax
imul eax, eax, 0x7ffd5907
mov word [ebp - 0x28], ax
movzx ecx, word [ebp - 0x28]
and ecx, dword [ebp - 0x20]
sub ecx, 0x7224
push ecx
movzx edx, word [ebp - 0x24]
and edx, dword [ebp - 0x20]
push edx
push 0
movzx eax, word [ebp - 0x28]
movzx edx, word [ebp - 0x24]
imul eax, edx
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CompareStringA]
mov word [ebp - 0x24], ax
mov cx, word [ebp - 0x24]
test cx, cx
je 0x402cc2
call dword [sym.imp.MSVCRT.dll__except_handler3]
movzx edx, word [ebp - 0x28]
movzx eax, word [ebp - 0x24]
imul edx, eax
sub edx, 0x74
mov word [ebp - 0x24], dx
cmp word [ebp - 0x24], 0xff8c
jge 0x402cfc
mov edx, dword [ebp - 0x20]
sub edx, 0x251e
push edx
movzx eax, word [ebp - 0x28]
or eax, eax
push eax
mov ecx, dword [ebp - 0x20]
movzx edx, word [ebp - 0x24]
xor ecx, edx
push ecx
call dword [sym.imp.USER32.dll_BeginDeferWindowPos]
movzx eax, word [ebp - 0x24]
add eax, 0x561b
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0x155a7
je 0x402d17
call dword [sym.imp.GDI32.dll_GetBkMode]
movzx ecx, word [ebp - 0x28]
sub ecx, dword [ebp - 0x20]
add ecx, 0xe33b
push ecx
mov edx, dword [ebp - 0x20]
movzx ecx, word [ebp - 0x28]
sub edx, ecx
add edx, 0xffff1cc5
push edx
push 0
mov edx, dword [ebp - 0x20]
movzx ecx, word [ebp - 0x28]
and edx, ecx
sub edx, 0x5024
push edx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CompareStringA]
mov word [ebp - 0x24], ax
mov dx, word [ebp - 0x24]
test dx, dx
je 0x402d64
call dword [sym.imp.MSVCRT.dll__except_handler3]
movzx edx, word [ebp - 0x24]
sub edx, dword [ebp - 0x20]
add edx, 0x155a7
mov eax, dword [ebp - 8]
movzx ecx, byte [eax + edx]
mov edx, dword [ebp - 0x14]
mov byte [edx], cl
mov ecx, dword [ebp - 0x20]
sub ecx, 0x2b31
mov word [ebp - 0x28], cx
movzx ecx, word [ebp - 0x28]
and ecx, dword [ebp - 0x20]
sub ecx, 0x26
push ecx
mov edx, dword [ebp - 0x20]
movzx ecx, word [ebp - 0x24]
xor edx, ecx
sub edx, 0x155a7
push edx
push 0
movzx edx, word [ebp - 0x28]
movzx ecx, word [ebp - 0x24]
sub edx, ecx
sub edx, 0x2a76
push edx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CompareStringA]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x20]
test ecx, ecx
je 0x402dd2
call dword [sym.imp.MSVCRT.dll__except_handler3]
movzx edx, word [ebp - 0x28]
movzx ecx, word [ebp - 0x24]
sub edx, ecx
sub edx, 0x2a75
mov eax, dword [ebp - 0x14]
add eax, edx
mov dword [ebp - 0x14], eax
movzx ecx, word [ebp - 0x24]
mov word [ebp - 0x2c], cx
movzx eax, word [ebp - 0x28]
sub eax, dword [ebp - 0x20]
add eax, 0xffffd58b
mov edx, dword [ebp - 8]
add edx, eax
mov dword [ebp - 8], edx
movzx eax, word [ebp - 0x2c]
mov ecx, 0x41
xor edx, edx
div ecx
mov word [ebp - 0x24], dx
cmp word [ebp - 0x28], 0x2a76
jge 0x402e41
movzx edx, word [ebp - 0x2c]
movzx eax, word [ebp - 0x28]
xor edx, eax
push edx
movzx edx, word [ebp - 0x24]
and edx, 0x69000000
movzx ecx, word [ebp - 0x24]
sub ecx, edx
push ecx
call dword [sym.imp.USER32.dll_MsgWaitForMultipleObjects]
cmp dword [ebp - 0x20], 0
jge 0x402e4a
call dword [ebp - 0x30]
cmp word [ebp - 0x24], 0
jle 0x402e5c
movzx edx, word [ebp - 0x24]
mov eax, edx
jmp 0x402ffe
mov eax, dword [ebp - 0x20]
movzx ecx, word [ebp - 0x2c]
or eax, ecx
push eax
mov ecx, dword [ebp - 0x20]
movzx eax, word [ebp - 0x24]
xor ecx, eax
push ecx
push 0
mov eax, dword [ebp - 0x20]
movzx edx, word [ebp - 0x24]
and eax, edx
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CompareStringA]
mov word [ebp - 0x28], ax
mov dx, word [ebp - 0x28]
test dx, dx
je 0x402e99
call dword [sym.imp.MSVCRT.dll__except_handler3]
movzx edx, word [ebp - 0x24]
movzx ecx, word [ebp - 0x2c]
sub edx, ecx
sub edx, 0xffffffff
mov ecx, dword [ebp - 0x1c]
sub ecx, edx
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x20]
xor edx, 0x1767
and edx, dword [ebp - 0x20]
mov word [ebp - 0x24], dx
mov dx, word [ebp - 0x2c]
test dx, dx
je 0x402ecd
call dword [sym.imp.MSVCRT.dll_fwrite]
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x402eea
movzx edx, word [ebp - 0x24]
push edx
push dword [ebp - 0x20]
movzx edx, word [ebp - 0x24]
imul edx, edx, 0x2abe0000
push edx
call dword [ebp - 0x34]
movzx edx, word [ebp - 0x24]
imul edx, dword [ebp - 0x20]
push edx
movzx ecx, word [ebp - 0x24]
add ecx, dword [ebp - 0x20]
push ecx
push 0
movzx edx, word [ebp - 0x2c]
movzx eax, word [ebp - 0x28]
imul edx, eax
push edx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CompareStringA]
mov word [ebp - 0x28], ax
mov dx, word [ebp - 0x28]
test dx, dx
je 0x402f26
call dword [sym.imp.MSVCRT.dll__except_handler3]
jmp 0x402c26
movzx eax, word [ebp - 0x10]
shl eax, 8
movzx edi, ax
mov dl, byte [ebp - 4]
test dl, dl
je 0x402f68
mov ecx, edi
and ecx, 0x23db00
xor ecx, edi
push ecx
mov ecx, edi
imul ecx, esi
push ecx
mov edx, esi
and edx, 0xfb
movzx ecx, word [ebp - 0x10]
sub ecx, edx
push ecx
mov edx, dword [ebp - 0x18]
add edx, esi
push edx
call dword [sym.imp.GDI32.dll_CreateRectRgn]
movzx edx, word [ebp - 0x10]
or edx, edi
add edx, 0x31367763
mov ecx, 0x3173f773
xor ecx, edx
mov dword [ebp - 0xc], ecx
movzx eax, word [ebp - 0x10]
add eax, 1
mov word [ebp - 0x10], ax
cmp esi, 0
jge 0x402fb4
mov edx, esi
or edx, edx
add edx, 0xfe
push edx
movzx ecx, word [ebp - 0x10]
push ecx
movzx ecx, byte [ebp - 4]
and ecx, 0x2b00
mov eax, dword [ebp - 0x18]
sub eax, ecx
push eax
call dword [sym.imp.GDI32.dll_CreatePen]
mov eax, edi
and eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x18]
movzx eax, word [ebp - 0x10]
or ecx, eax
add ecx, 0xfe45ffff
push ecx
push 0
mov eax, dword [ebp - 0x18]
and eax, edi
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CompareStringA]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x402fec
call dword [sym.imp.MSVCRT.dll__except_handler3]
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x14]
mov dword [edx], eax
mov eax, edi
xor eax, esi
mov word [ebp - 0x10], ax
mov eax, esi
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret