Function at 0x410d90
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x658
mov eax, dword [0x41a018]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
mov edi, ecx
cmp dword [edi + 4], 0xffffffff
mov esi, edx
mov dword [ebp - 0x650], esi
je 0x410dbd
mov ebx, dword [edi]
call fcn.00410430
mov eax, dword [edi]
mov ebx, dword [ebp + 8]
mov dword [edi + 4], 0xffffffff
cmp ebx, dword [eax + 4]
jl 0x410de6
mov eax, 0x10000
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00411688
mov esp, ebp
pop ebp
ret 4
cmp ebx, dword [eax + 0x10]
jge 0x410df8
mov esi, eax
call fcn.0040fd70
mov esi, dword [ebp - 0x650]
mov eax, dword [edi]
cmp dword [eax + 0x10], ebx
jge 0x410e53
nop
mov esi, dword [edi]
test esi, esi
je 0x410e46
cmp dword [esi + 0x18], 0
je 0x410e46
mov eax, dword [esi + 0x10]
inc eax
cmp eax, dword [esi + 4]
je 0x410e46
mov ecx, dword [esi + 0x50]
add ecx, dword [esi + 0x4c]
mov edx, dword [esi + 0x48]
push 0
lea ecx, [ecx + edx + 0x2e]
add dword [esi + 0x14], ecx
mov dword [esi + 0x10], eax
push 0
lea edx, [esi + 0x78]
push edx
lea eax, [esi + 0x28]
push eax
mov eax, esi
call fcn.0040f970
add esp, 0x10
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
mov ecx, dword [edi]
cmp dword [ecx + 0x10], ebx
jl 0x410e00
mov esi, dword [ebp - 0x650]
push ebx
lea edx, [ebp - 0x64c]
mov ecx, edi
call fcn.00410600
test byte [ebp - 0x440], 0x10
movzx eax, word [esi]
je 0x410ec8
cmp eax, 0x2f
je 0x410e83
cmp eax, 0x5c
je 0x410e83
test ax, ax
je 0x410ea3
cmp word [esi + 2], 0x3a
jne 0x410ea3
push esi
push 0
call fcn.00410c60
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00411688
mov esp, ebp
pop ebp
ret 4
push esi
add edi, 0x244
push edi
call fcn.00410c60
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00411688
mov esp, ebp
pop ebp
ret 4
mov ebx, esi
mov ecx, esi
test ax, ax
je 0x410eec
cmp ax, 0x2f
je 0x410edd
cmp ax, 0x5c
jne 0x410ee0
lea ebx, [ecx + 2]
movzx eax, word [ecx + 2]
add ecx, 2
test ax, ax
jne 0x410ed1
lea edx, [ebp - 0x214]
mov eax, esi
sub edx, esi
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x410ef6
cmp ebx, esi
jne 0x410f8e
xor edx, edx
mov word [ebp - 0x214], dx
push ebx
lea edx, [ebp - 0x214]
push edx
lea esi, [edi + 0x244]
push esi
lea eax, [ebp - 0x41c]
push str._s_s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
lea ecx, [ebp - 0x214]
push ecx
push esi
call fcn.00410c60
add esp, 8
mov edx, dword [ebp - 0x440]
push 0
push edx
push 2
push 0
push 0
push 0x40000000
lea eax, [ebp - 0x41c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x410ff8
mov eax, 0x200
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00411688
mov esp, ebp
pop ebp
ret 4
mov eax, ebx
sub eax, esi
sar eax, 1
xor ecx, ecx
mov word [ebp + eax*2 - 0x214], cx
mov ax, word [ebp - 0x214]
cmp ax, 0x2f
je 0x410fc8
cmp ax, 0x5c
je 0x410fc8
test ax, ax
je 0x410f16
cmp word [ebp - 0x212], 0x3a
jne 0x410f16
push ebx
lea edx, [ebp - 0x214]
push edx
lea eax, [ebp - 0x41c]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
lea ecx, [ebp - 0x214]
push ecx
push 0
call fcn.00410c60
add esp, 0x18
jmp 0x410f4a
mov ecx, dword [edi + 0x23c]
mov esi, dword [edi]
push ecx
call fcn.00410060
add esp, 4
cmp dword [edi + 0x240], 0
jne 0x411026
push 0x4000
call dword [sym.imp.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_]
add esp, 4
mov dword [edi + 0x240], eax
mov dword [ebp - 0x650], 0
mov eax, dword [edi + 0x240]
lea edx, [ebp - 0x651]
push edx
push eax
mov eax, dword [edi]
mov ecx, 0x4000
call fcn.004101d0
mov esi, eax
add esp, 8
cmp esi, 0xffffff96
je 0x41108f
test esi, esi
js 0x411083
jle 0x411076
mov edx, dword [edi + 0x240]
push 0
lea ecx, [ebp - 0x658]
push ecx
push esi
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41109b
cmp byte [ebp - 0x651], 0
jne 0x4110a7
test esi, esi
jne 0x411030
mov dword [ebp - 0x650], 0x5000000
jmp 0x4110c3
mov dword [ebp - 0x650], 0x1000
jmp 0x4110c3
mov dword [ebp - 0x650], 0x400
jmp 0x4110c3
lea eax, [ebp - 0x42c]
push eax
lea ecx, [ebp - 0x43c]
push ecx
lea edx, [ebp - 0x434]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [edi]
call fcn.00410430
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x650]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00411688
mov esp, ebp
pop ebp
ret 4