Function at 0x41de70
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x40010
call fcn.0042f240
mov eax, dword [0x46b600]
push esi
mov esi, ecx
mov dword [esp + 0x40010], eax
cmp dword [esi + 0x1040], 0xffffffff
je 0x41e14b
cmp byte [esi + 0x1044], 1
je 0x41e14b
mov al, byte [esi + 0x1045]
test al, al
push ebx
push ebp
push edi
jne 0x41e0c6
mov al, byte [esi + 0x10730]
test al, al
jne 0x41dec7
mov dword [esi + 0xc], 0
jmp 0x41ded1
mov ecx, esi
call fcn.0041db00
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 0x1040]
push 0
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x41e11b
push 0x40
push esi
lea edx, [esp + 0x24]
lea ebp, [esi + 0x1048]
push edx
mov ecx, ebp
call fcn.0041cbf0
mov edx, dword [esi + 0x1040]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
mov dword [esp + 0x18], eax
lea eax, [esp + 0x14]
push eax
mov ebx, 4
push ebx
lea ecx, [esp + 0x20]
push ecx
push edx
call edi
cmp eax, 1
jne 0x41e11b
cmp dword [esp + 0x10], ebx
jne 0x41e11b
mov ecx, dword [esp + 0x14]
push 0
lea eax, [esp + 0x14]
push eax
mov eax, dword [esi + 0x1040]
push ecx
lea edx, [esp + 0x28]
push edx
push eax
call edi
cmp eax, 1
jne 0x41e11b
mov ecx, dword [esp + 0x10]
cmp ecx, dword [esp + 0x14]
jne 0x41e11b
test dword [esi + 8], 0xfffffc00
mov dword [esp + 0x18], 0
jbe 0x41e018
lea ebx, [esi + 0x40]
mov edx, dword [ebx]
push 0x20000
push edx
lea eax, [esp + 0x24]
push eax
mov ecx, ebp
call fcn.0041cbf0
push 0
lea ecx, [esp + 0x14]
push ecx
push 4
lea edx, [esp + 0x20]
mov dword [esp + 0x20], eax
mov eax, dword [esi + 0x1040]
push edx
push eax
call edi
cmp eax, 1
jne 0x41e11b
cmp dword [esp + 0x10], 4
jne 0x41e11b
mov edx, dword [esp + 0x14]
push 0
lea ecx, [esp + 0x14]
push ecx
mov ecx, dword [esi + 0x1040]
push edx
lea eax, [esp + 0x28]
push eax
push ecx
call edi
cmp eax, 1
jne 0x41e11b
mov edx, dword [esp + 0x10]
cmp edx, dword [esp + 0x14]
jne 0x41e11b
mov eax, dword [esp + 0x18]
mov ecx, dword [esi + 8]
inc eax
shr ecx, 0xa
add ebx, 4
cmp eax, ecx
mov dword [esp + 0x18], eax
jb 0x41df85
mov ebx, 4
test dword [esi + 8], 0x3ff
je 0x41e099
mov edx, dword [esp + 0x18]
mov eax, dword [esi + edx*4 + 0x40]
push 0x20000
push eax
lea ecx, [esp + 0x24]
push ecx
mov ecx, ebp
call fcn.0041cbf0
mov ecx, dword [esi + 0x1040]
push 0
lea edx, [esp + 0x14]
push edx
mov dword [esp + 0x1c], eax
push ebx
lea eax, [esp + 0x20]
push eax
push ecx
call edi
cmp eax, 1
jne 0x41e11b
cmp dword [esp + 0x10], ebx
jne 0x41e11b
mov eax, dword [esp + 0x14]
push 0
lea edx, [esp + 0x14]
push edx
mov edx, dword [esi + 0x1040]
push eax
lea ecx, [esp + 0x28]
push ecx
push edx
call edi
cmp eax, 1
jne 0x41e11b
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x14]
jne 0x41e11b
mov edx, dword [esi + 0x1040]
push 0
lea ecx, [esp + 0x14]
push ecx
push ebx
lea eax, [esi + 0x10]
push eax
push edx
call edi
cmp eax, 1
jne 0x41e11b
cmp dword [esp + 0x10], ebx
jne 0x41e11b
mov eax, dword [esi + 0x1040]
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
lea edi, [esi + 0x40]
mov ebx, 0x400
mov edi, edi
mov eax, dword [edi]
test eax, eax
je 0x41e0df
push eax
call fcn.00442143
add esp, 4
mov dword [edi], 0
add edi, 4
dec ebx
jne 0x41e0d0
mov edx, dword [esi + 0x1040]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop ebp
pop ebx
mov dword [esi + 0x1040], 0xffffffff
mov al, 1
pop esi
mov ecx, dword [esp + 0x4000c]
call fcn.0042f2ae
add esp, 0x40010
ret
mov ecx, dword [esi + 0x1040]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop ebp
pop ebx
mov dword [esi + 0x1040], 0xffffffff
xor al, al
pop esi
mov ecx, dword [esp + 0x4000c]
call fcn.0042f2ae
add esp, 0x40010
ret
mov ecx, dword [esp + 0x40010]
mov al, 1
pop esi
call fcn.0042f2ae
add esp, 0x40010
ret