Function at 0x409b50
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
mov eax, dword [esp + 0x64]
mov esi, dword [esp + 0x60]
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 0
mov dword [esp + 0x28], eax
mov ebx, eax
test ax, ax
je 0x409bb0
xor eax, eax
movzx ebp, bx
jmp 0x409b88
mov eax, ecx
cmp bx, cx
jbe 0x409bb0
movzx edx, ax
lea ecx, [eax + 1]
lea edi, [esi + edx*2]
cmp byte [edi + 1], 0xff
jne 0x409b81
cmp byte [edi], 0xff
jne 0x409b81
add edx, 1
add eax, 2
cmp edx, ebp
cmovl ecx, eax
mov eax, ecx
cmp bx, cx
ja 0x409b88
nop
lea eax, [esp + 0x38]
mov dword [esp + 4], 4
mov dword [esp + 8], eax
mov dword [esp], 0
call fcn.00427280
mov edi, edx
mov dword [esp + 0x20], eax
or edi, eax
mov dword [esp + 0x24], edx
jne 0x409cc0
lea eax, [esp + 0x3c]
mov dword [esp + 0xc], 2
mov dword [esp + 0x10], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 2
mov dword [esp], 4
call fcn.0041c580
mov edi, edx
mov dword [esp + 0x20], eax
or edi, eax
mov dword [esp + 0x24], edx
jne 0x409e00
movzx eax, bx
xor edi, edi
xor ebp, ebp
cmp word [esp + 0x28], 0
mov dword [esp + 0x2c], eax
mov eax, ebx
mov ebx, edi
mov edi, eax
jne 0x409caa
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
mov dword [eax], edx
mov edx, dword [esp + 0x68]
mov dword [edx], eax
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
cmp byte [eax], 0xff
jne 0x409c70
add ecx, 1
cmp ecx, dword [esp + 0x2c]
jl 0x409dd0
mov esi, esi
lea edi, [edi]
mov word [esp + 0x36], bx
cmp bh, dl
jne 0x409c7d
cmp byte [eax], bl
je 0x409c9f
mov dword [esp + 8], eax
lea eax, [esp + 0x36]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x3c]
mov dword [esp], eax
call fcn.0041c720
mov ecx, edx
or ecx, eax
jne 0x409d81
add ebx, 1
add ebp, 1
cmp di, bp
jbe 0x409c35
movzx ecx, bp
lea eax, [esi + ecx*2]
movzx edx, byte [eax + 1]
cmp dl, 0xff
jne 0x409c70
jmp 0x409c55
mov dword [esp + 4], edx
mov edi, eax
mov dword [esp], eax
call fcn.0041d490
mov dword [esp], 2
mov ebx, dword [fcn.004a1b90]
mov esi, eax
call ebx
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x4a6120
mov dword [esp + 4], 0x4a6128
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 2
call ebx
mov dword [esp + 8], 2
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], 0x4a617d
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call ebx
mov dword [esp], eax
call sub.msvcrt.dll_fflush
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x409d55
lea eax, [esp + 0x3c]
mov dword [esp], eax
call fcn.0041c850
mov eax, dword [esp + 0x38]
test eax, eax
je 0x409c45
lea esi, [esp + 0x38]
mov dword [esp], eax
mov dword [esp + 4], esi
call fcn.0041d440
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], edx
mov dword [esp], eax
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], eax
call fcn.0041d490
mov dword [esp], 2
mov ebx, dword [fcn.004a1b90]
mov edi, eax
call ebx
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x10], edi
mov dword [esp + 8], 0x4a6120
mov dword [esp + 0xc], ecx
mov dword [esp + 4], 0x4a61b8
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
jmp 0x409d07
add ebp, 1
movzx eax, bp
lea ecx, [esi + eax*2]
movzx eax, byte [ecx + 1]
shl eax, 8
mov edx, eax
movzx eax, byte [ecx]
or eax, edx
movzx eax, ax
add eax, ebx
cmp ebx, eax
cmovb ebx, eax
jmp 0x409ca2
mov edi, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
mov dword [esp], edi
mov dword [esp + 4], eax
call fcn.0041d490
mov dword [esp], 2
mov ebx, dword [fcn.004a1b90]
mov esi, eax
call ebx
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0x4a6120
mov dword [esp + 4], 0x4a6180
jmp 0x409dc2