Function at 0x41a370
Capabilities:
Write file on windows

Disassembly:
sub esp, 8
push ebx
push ebp
push esi
mov esi, ecx
xor ebp, ebp
push edi
mov al, byte [esi + 0x120]
mov dword [esp + 0x10], ebp
test al, 1
jne 0x41a555
cmp dword [esi + 0x140], ebp
je 0x41a555
mov ecx, dword [esi + 0x138]
xor eax, eax
cmp dword [ecx], ebp
jne 0x41a3b2
mov edx, ecx
mov edi, dword [edx + 4]
add edx, 4
inc eax
cmp edi, ebp
je 0x41a3a7
cmp dword [ecx + eax*4], ebp
je 0x41a3ea
mov dword [esi + 0x14c], eax
mov edx, dword [ecx + eax*4]
mov edx, dword [edx]
mov dword [esi + 0x148], edx
mov eax, dword [ecx + eax*4]
add eax, 4
lea ecx, [esi + 0x150]
mov edx, dword [eax]
mov dword [ecx], edx
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
mov edx, dword [eax + 8]
mov dword [ecx + 8], edx
mov eax, dword [eax + 0xc]
mov dword [ecx + 0xc], eax
lea ecx, [esi + 0x150]
mov ebx, dword [esi + 0x150]
mov edi, dword [ecx + 4]
mov ebp, dword [ecx + 8]
mov eax, dword [ecx + 0xc]
test ax, ax
jbe 0x41a43c
mov edx, dword [esi + 0x10c]
push 0
push 0
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [esi + 0x10c]
lea eax, [esp + 0x14]
push 0
add edi, 0x20
push eax
push edi
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x41a43c
or edi, 0xffffffff
mov dword [esp + 0x10], edi
jmp 0x41a43f
or edi, 0xffffffff
push ebx
call fcn.0041e706
mov eax, dword [esi + 0x14c]
add esp, 4
cmp eax, edi
jne 0x41a469
lea edx, [esi + 0x150]
xor cl, cl
mov eax, edx
mov edx, dword [eax]
mov edi, dword [eax + 4]
mov ebp, dword [eax + 8]
jmp 0x41a546
mov edx, dword [esi + 0x138]
mov eax, dword [edx + eax*4]
test eax, eax
je 0x41a48e
mov ecx, dword [esi + 0x148]
cmp dword [eax], ecx
jne 0x41a487
mov ebx, dword [eax + 0x14]
test ebx, ebx
jne 0x41a4e8
mov eax, dword [eax + 0x14]
test eax, eax
jne 0x41a47c
mov ecx, dword [esi + 0x13c]
mov ebp, dword [esi + 0x14c]
inc ebp
mov eax, ebp
mov dword [esi + 0x14c], ebp
cmp eax, ecx
jge 0x41a51b
mov ebx, dword [edx + eax*4]
test ebx, ebx
je 0x41a494
cmp eax, ecx
jge 0x41a51b
mov ecx, ebx
test ecx, ecx
je 0x41a51b
mov ecx, dword [ecx]
mov dword [esi + 0x148], ecx
mov eax, dword [edx + eax*4]
add eax, 4
lea edx, [esi + 0x150]
mov ecx, eax
mov edi, dword [ecx]
mov dword [edx], edi
mov edi, dword [ecx + 4]
mov dword [edx + 4], edi
mov edi, dword [ecx + 8]
mov dword [edx + 8], edi
mov ecx, dword [ecx + 0xc]
mov dword [edx + 0xc], ecx
mov cl, 1
jmp 0x41a53e
mov ecx, dword [eax + 0x14]
mov edx, dword [ecx]
lea ecx, [esi + 0x150]
mov dword [esi + 0x148], edx
mov eax, dword [eax + 0x14]
add eax, 4
mov edx, eax
mov edi, dword [edx]
mov dword [ecx], edi
mov edi, dword [edx + 4]
mov dword [ecx + 4], edi
mov edi, dword [edx + 8]
mov dword [ecx + 8], edi
mov edx, dword [edx + 0xc]
mov dword [ecx + 0xc], edx
mov cl, 1
jmp 0x41a53e
lea eax, [esi + 0x150]
xor edx, edx
mov ecx, eax
mov dword [esi + 0x14c], edi
mov dword [esi + 0x148], edi
mov dword [ecx], edx
mov dword [ecx + 4], edx
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], edx
xor cl, cl
mov edx, dword [eax]
mov edi, dword [eax + 4]
mov ebp, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov ebx, edx
test cl, cl
jne 0x41a3ff
xor ebp, ebp
or eax, 0xffffffff
xor edx, edx
mov dword [esi + 0x148], eax
mov dword [esi + 0x14c], eax
lea eax, [esi + 0x150]
xor ebx, ebx
mov dword [eax], edx
mov dword [eax + 4], edx
mov dword [eax + 8], edx
mov dword [eax + 0xc], edx
mov eax, dword [esi + 0x13c]
cmp eax, ebp
jle 0x41a5b9
mov ecx, dword [esi + 0x138]
mov edi, dword [ecx + ebx*4]
cmp edi, ebp
je 0x41a5a4
mov eax, edi
mov edi, dword [edi + 0x14]
push eax
call fcn.0041e706
add esp, 4
test edi, edi
jne 0x41a590
xor ebp, ebp
mov edx, dword [esi + 0x138]
inc ebx
mov dword [edx + ebx*4 - 4], ebp
mov eax, dword [esi + 0x13c]
cmp ebx, eax
jl 0x41a583
mov eax, dword [esp + 0x10]
mov dword [esi + 0x140], ebp
mov dword [esi + 0x16c], ebp
mov dword [esi + 0x170], ebp
mov dword [esi + 0x164], ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret