Function at 0x422140
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43b0d0
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x44e018]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov ebx, ecx
xor eax, eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], eax
call fcn.00422b00
mov eax, dword [ebx + 0x10]
lea esi, [ebx + 4]
add eax, 8
cmp eax, dword [esi + 0x10]
jb 0x42218d
call fcn.00425c80
mov eax, dword [esi + 0xc]
lea ecx, [eax + 8]
mov dword [esi + 0xc], ecx
test eax, eax
je 0x4221a4
mov dword [eax], 0
mov byte [eax + 4], 0
mov eax, dword [ebx]
mov esi, dword [eax]
push 0x7b
call fcn.004235f0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
mov eax, dword [eax]
add esp, 4
mov dword [ebp - 0x14], eax
lea ecx, [ecx]
mov ecx, dword [ebp + 8]
cmp eax, dword [ecx + 4]
je 0x422228
cmp dword [eax + 0x1c], 8
lea edi, [eax + 8]
jb 0x4221d3
mov edi, dword [edi]
mov esi, edi
cmp word [esi], 0
je 0x4221e0
add esi, 2
jmp 0x4221d5
call fcn.00422b00
sub esi, edi
sar esi, 1
push esi
push edi
push ebx
call fcn.00422e20
mov eax, dword [ebp - 0x14]
push ebx
add eax, 0x24
call fcn.00423160
mov edx, dword [ebp - 0x14]
add esp, 4
add dword [ebp - 0x18], eax
mov eax, dword [edx]
mov dword [ebp - 0x14], eax
jmp 0x4221c0
add dword [ebx + 0x10], 0xfffffff8
mov eax, dword [ebx + 0x10]
cmp dword [eax], 0
je 0x4222c1
mov ecx, dword [ebx]
mov esi, dword [ecx]
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x422267
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x422267
mov edx, dword [esi]
mov edi, dword [sym.imp.MSVCR100.dll_fwrite]
push edx
sub eax, ecx
push eax
push 1
push ecx
call edi
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
jmp 0x42226d
mov edi, dword [sym.imp.MSVCR100.dll_fwrite]
mov ecx, dword [esi + 0xc]
mov byte [ecx], 0xa
inc dword [esi + 0xc]
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x422299
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x422299
mov edx, dword [esi]
push edx
sub eax, ecx
push eax
push 1
push ecx
call edi
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov ecx, dword [esi + 0xc]
mov byte [ecx], 0
inc dword [esi + 0xc]
mov eax, dword [ebx + 0x10]
sub eax, dword [ebx + 0xc]
movzx edx, word [ebx + 0x20]
mov ecx, dword [ebx]
shr eax, 3
imul eax, dword [ebx + 0x24]
push edx
push ecx
call fcn.00423660
add esp, 8
jmp 0x4222c7
mov edi, dword [sym.imp.MSVCR100.dll_fwrite]
mov edx, dword [ebx]
mov esi, dword [edx]
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x4222ee
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x4222ee
mov edx, dword [esi]
push edx
sub eax, ecx
push eax
push 1
push ecx
call edi
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov ecx, dword [esi + 0xc]
mov byte [ecx], 0x7d
inc dword [esi + 0xc]
mov eax, dword [esi + 0xc]
cmp eax, dword [esi + 8]
jb 0x42231a
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x42231a
mov edx, dword [esi]
push edx
sub eax, ecx
push eax
push 1
push ecx
call edi
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov ecx, dword [esi + 0xc]
mov byte [ecx], 0
inc dword [esi + 0xc]
mov edx, dword [ebx + 0x10]
cmp edx, dword [ebx + 0xc]
jne 0x42234d
mov eax, dword [ebx]
mov esi, dword [eax]
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 4]
cmp eax, ecx
je 0x42234d
mov edx, dword [esi]
push edx
sub eax, ecx
push eax
push 1
push ecx
call edi
mov eax, dword [esi + 4]
add esp, 0x10
mov dword [esi + 0xc], eax
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret