Function at 0x4509e0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4b9996
mov eax, dword fs:[0]
push eax
sub esp, 0x288
mov eax, dword [0x50a360]
xor eax, esp
mov dword [esp + 0x280], eax
push ebx
push esi
push edi
mov eax, dword [0x50a360]
xor eax, esp
push eax
lea eax, [esp + 0x298]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [esi + 0x318]
sub eax, 0x10
push eax
call fcn.00401560
lea ebx, [eax + 0x10]
add esp, 4
mov dword [esp + 0x20], ebx
cmp dword [esi + 0x320], 0
mov dword [esp + 0x2a0], 0
mov edi, 1
je 0x450d1c
cmp dword [ebx - 0xc], 0
je 0x450d1c
push str.OMIT
push ebx
call fcn.00495a5d
xor ecx, ecx
add esp, 8
cmp eax, ecx
je 0x450d1c
mov dword [esp + 0x14], ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x18], ecx
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x20]
push eax
push ebx
mov ecx, esi
call fcn.004502a0
test eax, eax
je 0x450d1c
mov eax, dword [esi + 0x32c]
cmp eax, 2
jne 0x450c16
mov ecx, dword [esi + 0x2dc]
sub ecx, dword [esi + 0x2d8]
add esi, 0x2cc
mov eax, 0x6bca1af3
imul ecx
mov ecx, dword [esp + 0x10]
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
add ecx, 0xc
xor edi, edi
mov dword [esp + 0x18], eax
mov dword [esp + 0x10], ecx
test eax, eax
jle 0x450b59
push edi
mov ecx, esi
call fcn.0044fdd0
mov eax, dword [eax + 0xc]
lea edx, [eax + eax*2]
mov eax, dword [esp + 0x10]
push edi
mov ecx, esi
lea ebx, [eax + edx*4]
call fcn.0044fdd0
mov edx, dword [eax]
mov ecx, dword [esp + 0x14]
mov dword [ebx + ecx], edx
mov edx, dword [eax + 4]
mov dword [ebx + ecx + 4], edx
mov eax, dword [eax + 8]
mov dword [ebx + ecx + 8], eax
push edi
mov ecx, esi
call fcn.0044fdd0
cmp dword [eax + 0x10], 1
jne 0x450b4e
push edi
mov ecx, esi
call fcn.0044fdd0
movzx ecx, byte [eax + 0xa]
mov edx, dword [esp + 0x10]
lea eax, [edx + ecx*4]
mov dword [esp + 0x10], eax
inc edi
cmp edi, dword [esp + 0x18]
jl 0x450af5
mov ebx, dword [esp + 0x20]
mov esi, dword [esp + 0x14]
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x450c4d
lea ecx, [esp + 0x10]
call fcn.00401600
mov ebx, dword [esp + 0x20]
push ebx
lea edx, [esp + 0x14]
push str.Can_not_create_file___s_.
push edx
mov byte [esp + 0x2ac], 1
call fcn.00401cb0
mov edi, dword [esp + 0x1c]
add esp, 0xc
push 0
push 0
push edi
call fcn.0046cf28
test esi, esi
je 0x450bc4
push esi
call fcn.0046436b
add esp, 4
lea eax, [edi - 0x10]
mov byte [esp + 0x2a0], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x450be8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebx - 0x10]
mov dword [esp + 0x2a0], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x450c0f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x450d45
mov ecx, 0x2c
cmp eax, 1
jne 0x450c2d
mov ecx, dword [esi + 0x334]
lea ecx, [ecx*4 + 0x34]
push ecx
mov ecx, dword [esp + 0x14]
add esi, 0x1c4
push esi
mov esi, dword [esp + 0x1c]
add ecx, esi
push ecx
call fcn.00494d40
add esp, 0xc
jmp 0x450b5d
cmp dword [esp + 0x1c], 0x200
jbe 0x450ce6
lea ecx, [esp + 0x8c]
call fcn.0044faf0
mov ecx, 0x80
lea edi, [esp + 0x8c]
rep movsd dword es:[edi], dword [esi]
cmp dword [esp + 0x8c], 0x42544844
jne 0x450ce2
mov ecx, dword [esp + 0xbc]
add ecx, 0x200
cmp ecx, dword [esp + 0x1c]
jne 0x450ce2
lea edx, [esp + 0x24]
push edx
call fcn.00461110
mov eax, dword [esp + 0xc0]
mov esi, dword [esp + 0x18]
push eax
lea ecx, [esi + 0x200]
push ecx
lea edx, [esp + 0x30]
push edx
call fcn.00463b70
lea eax, [esp + 0xa4]
push eax
lea ecx, [esp + 0x38]
push ecx
call fcn.00463c10
lea edi, [esi + 8]
mov ecx, 8
lea esi, [esp + 0xac]
add esp, 0x18
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
push 0
lea edx, [esp + 0x1c]
push edx
push eax
push esi
push ebx
mov dword [esp + 0x2c], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x450d18
push esi
call fcn.0046436b
add esp, 4
mov ebx, dword [esp + 0x20]
lea eax, [ebx - 0x10]
mov dword [esp + 0x2a0], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x450d43
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
mov ecx, dword [esp + 0x298]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x280]
xor ecx, esp
call fcn.004945a7
mov esp, ebp
pop ebp
ret