Function at 0x412f40
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43e6a0
mov eax, dword fs:[0]
push eax
sub esp, 0x58
push ebx
push esi
push edi
mov eax, dword [0x451d80]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x50]
test eax, eax
je 0x4131db
mov eax, dword [ecx + 0x4c]
mov esi, dword [eax]
lea ebx, [ecx + 0x48]
mov dword [ebp - 4], 0
cmp dword [ecx + 0x70], 0
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x20], ebx
jne 0x4131db
jmp 0x412fa0
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x4c]
add edi, 0x48
test ebx, ebx
mov dword [ebp - 0x24], eax
je 0x412fb4
cmp ebx, edi
je 0x412fb9
call fcn.004269df
cmp esi, dword [ebp - 0x24]
je 0x41308c
test ebx, ebx
jne 0x412fcb
call fcn.004269df
cmp esi, dword [ebx + 4]
jne 0x412fd5
call fcn.004269df
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
push 0
push 0
push ecx
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x34]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x413008
lea ecx, [ebp - 0x34]
call fcn.004266e9
push 0x44dad4
lea eax, [ebp - 0x34]
push eax
call fcn.0042bb2f
cmp esi, dword [ebx + 4]
jne 0x413012
call fcn.004269df
mov edi, dword [esi + 0x18]
sub edi, dword [esi + 0x10]
cmp esi, dword [ebx + 4]
jne 0x413022
call fcn.004269df
mov edx, dword [esi + 0x24]
push 0
lea ecx, [ebp - 0x18]
push ecx
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x34]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x413054
lea ecx, [ebp - 0x40]
call fcn.004266e9
push 0x44dad4
lea ecx, [ebp - 0x40]
push ecx
call fcn.0042bb2f
cmp esi, dword [ebx + 4]
jne 0x413068
call fcn.004269df
cmp esi, dword [ebx + 4]
jne 0x413068
call fcn.004269df
mov edx, dword [esi + 0x20]
push edx
add esi, 0x24
push esi
add edi, 0xc
push edi
call fcn.004144e0
lea esi, [ebp - 0x20]
call fcn.004139c0
mov esi, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x20]
jmp 0x412fa0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x34]
push ecx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
jne 0x4130b3
lea ecx, [ebp - 0x4c]
call fcn.004266e9
push 0x44dad4
lea edx, [ebp - 0x4c]
push edx
call fcn.0042bb2f
mov eax, dword [edi + 4]
mov eax, dword [eax]
mov esi, eax
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], esi
test edi, edi
mov ebx, dword [ebp + 8]
mov ecx, dword [ebx + 0x4c]
lea eax, [ebx + 0x48]
mov dword [ebp - 0x24], ecx
je 0x4130d4
cmp edi, eax
je 0x4130d9
call fcn.004269df
cmp esi, dword [ebp - 0x24]
je 0x413146
test edi, edi
jne 0x4130e7
call fcn.004269df
cmp esi, dword [edi + 4]
jne 0x4130f1
call fcn.004269df
mov ebx, dword [esi + 0x18]
mov edx, dword [esi + 0x1c]
add ebx, 0x3fff
adc edx, 0
shrd ebx, edx, 0xe
shr edx, 0xe
cmp esi, dword [edi + 4]
jne 0x413111
call fcn.004269df
mov edi, dword [esi + 0x10]
mov eax, dword [esi + 0x14]
shrd edi, eax, 0xe
shr eax, 0xe
mov edi, edi
cmp edi, ebx
jae 0x413133
mov ecx, dword [ebp + 8]
mov eax, edi
call fcn.004140b0
add edi, 1
jmp 0x413120
lea esi, [ebp - 0x20]
call fcn.004139c0
mov esi, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x20]
jmp 0x4130c0
mov ecx, dword [ebx]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_FlushViewOfFile]
test eax, eax
jne 0x41316b
lea ecx, [ebp - 0x58]
call fcn.004266e9
push 0x44dad4
lea edx, [ebp - 0x58]
push edx
call fcn.0042bb2f
mov eax, dword [ebx + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
jne 0x4131ab
lea ecx, [ebp - 0x64]
call fcn.004266e9
push 0x44dad4
lea ecx, [ebp - 0x64]
push ecx
call fcn.0042bb2f
mov edx, dword [ebp + 8]
mov dword [edx + 0x70], 1
mov dword [ebp - 4], 0xffffffff
mov eax, 0x4131a6
ret
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebx + 0x4c]
mov ecx, dword [eax + 4]
lea esi, [ebx + 0x48]
push ecx
mov ecx, esi
call fcn.004133e0
mov eax, dword [esi + 4]
mov dword [eax + 4], eax
mov eax, dword [esi + 4]
mov dword [esi + 8], 0
mov dword [eax], eax
mov esi, dword [esi + 4]
mov dword [esi + 8], esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4