Function at 0x456250
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x594ccc]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
mov eax, 0xffff
mov edx, ecx
mov dword [ebp - 0x24], edx
cmp ax, si
jne 0x456286
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051d23b
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [edx + 0x24]
cmp dword [ecx], 0
push edi
je 0x4562c1
mov eax, dword [edx + 0x34]
mov ecx, dword [ecx]
mov edi, dword [eax]
lea edi, [ecx + edi*2]
cmp ecx, edi
jae 0x4562c1
dec dword [eax]
mov eax, dword [edx + 0x24]
mov ecx, dword [eax]
lea edx, [ecx + 2]
mov dword [eax], edx
pop edi
mov word [ecx], si
mov ax, si
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051d23b
mov esp, ebp
pop ebp
ret 4
mov eax, dword [edx + 0x4c]
test eax, eax
jne 0x4562df
pop edi
mov eax, 0xffff
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051d23b
mov esp, ebp
pop ebp
ret 4
cmp dword [edx + 0x3c], 0
jne 0x456314
push eax
push esi
call fcn.005213b5
mov ecx, 0xffff
add esp, 8
cmp ax, cx
movzx eax, si
jne 0x4565fd
pop edi
mov eax, ecx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051d23b
mov esp, ebp
pop ebp
ret 4
movzx edx, si
mov ecx, 0xf
xor eax, eax
mov byte [ebp - 0x1c], 0
mov dword [ebp - 0x28], edx
mov dword [ebp - 8], ecx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0xc], 8
cmp ecx, 0x10
jae 0x45633d
lea eax, [ebp - 0x1c]
mov byte [eax + 8], 0
push ebx
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 8]
jmp 0x456350
cmp edx, 0x10
jb 0x45656a
mov ebx, eax
mov dword [ebp - 0x2c], ebx
test eax, eax
je 0x456383
mov ecx, eax
cmp edx, 0x10
jae 0x45636c
lea ecx, [ebp - 0x1c]
cmp ecx, ebx
ja 0x456383
mov ecx, eax
cmp edx, 0x10
jae 0x45637a
lea ecx, [ebp - 0x1c]
mov esi, dword [ebp - 0xc]
add ecx, esi
cmp ebx, ecx
jbe 0x45638e
call fcn.0051f89a
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x1c]
lea ecx, [ebp - 0x20]
cmp ecx, 0xfffffffc
je 0x4563b4
mov ecx, eax
cmp edx, 0x10
jae 0x4563a0
lea ecx, [ebp - 0x1c]
mov esi, dword [ebp - 0xc]
add ecx, esi
cmp ebx, ecx
jb 0x4563b4
call fcn.0051f89a
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x1c]
mov edi, dword [ebp - 0xc]
cmp edx, 0x10
jb 0x456575
mov esi, eax
test eax, eax
je 0x4563ea
mov ecx, eax
cmp edx, 0x10
jae 0x4563d0
lea ecx, [ebp - 0x1c]
cmp ecx, esi
ja 0x4563ea
mov ecx, eax
cmp edx, 0x10
jae 0x4563de
lea ecx, [ebp - 0x1c]
mov ebx, dword [ebp - 0xc]
add ecx, ebx
mov ebx, dword [ebp - 0x2c]
cmp esi, ecx
jbe 0x4563f5
call fcn.0051f89a
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x1c]
lea ecx, [ebp - 0x20]
cmp ecx, 0xfffffffc
je 0x456413
cmp edx, 0x10
jae 0x456405
lea eax, [ebp - 0x1c]
mov edx, dword [ebp - 0xc]
add eax, edx
cmp esi, eax
jb 0x456413
call fcn.0051f89a
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax + 0x3c]
mov edx, dword [ecx]
mov edx, dword [edx + 0x14]
lea eax, [ebp - 0x34]
push eax
add ebx, edi
push ebx
push esi
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x26]
push eax
lea eax, [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x24]
add eax, 0x44
push eax
call edx
test eax, eax
jl 0x4565ef
cmp eax, 1
jg 0x45658d
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x1c]
cmp edx, 0x10
jb 0x45657d
mov esi, eax
test eax, eax
je 0x456482
mov ecx, eax
cmp edx, 0x10
jae 0x45646b
lea ecx, [ebp - 0x1c]
cmp ecx, esi
ja 0x456482
mov ecx, eax
cmp edx, 0x10
jae 0x456479
lea ecx, [ebp - 0x1c]
mov edi, dword [ebp - 0xc]
add ecx, edi
cmp esi, ecx
jbe 0x45648d
call fcn.0051f89a
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x1c]
lea ecx, [ebp - 0x20]
cmp ecx, 0xfffffffc
je 0x4564b3
mov ecx, eax
cmp edx, 0x10
jae 0x45649f
lea ecx, [ebp - 0x1c]
mov edi, dword [ebp - 0xc]
add ecx, edi
cmp esi, ecx
jb 0x4564b3
call fcn.0051f89a
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x34]
sub edi, esi
je 0x456534
cmp edx, 0x10
jb 0x456585
mov esi, eax
test eax, eax
je 0x4564ea
mov ecx, eax
cmp edx, 0x10
jae 0x4564d3
lea ecx, [ebp - 0x1c]
cmp ecx, esi
ja 0x4564ea
mov ecx, eax
cmp edx, 0x10
jae 0x4564e1
lea ecx, [ebp - 0x1c]
mov ebx, dword [ebp - 0xc]
add ecx, ebx
cmp esi, ecx
jbe 0x4564f5
call fcn.0051f89a
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x1c]
lea ecx, [ebp - 0x20]
cmp ecx, 0xfffffffc
je 0x456513
cmp edx, 0x10
jae 0x456505
lea eax, [ebp - 0x1c]
mov edx, dword [ebp - 0xc]
add eax, edx
cmp esi, eax
jb 0x456513
call fcn.0051f89a
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax + 0x4c]
push ecx
push edi
push 1
push esi
call fcn.00522696
add esp, 0x10
cmp edi, eax
jne 0x4565ef
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x24]
mov byte [ecx + 0x42], 1
lea ecx, [ebp - 0x28]
cmp dword [ebp - 0x30], ecx
jne 0x4565d0
test edi, edi
ja 0x456350
cmp dword [ebp - 0xc], 0x20
lea ecx, [ebp - 0x20]
jae 0x4565f2
push 0
push 8
call fcn.0044ba60
jmp 0x456342
lea ebx, [ebp - 0x1c]
mov dword [ebp - 0x2c], ebx
jmp 0x456362
lea esi, [ebp - 0x1c]
jmp 0x4563c6
lea esi, [ebp - 0x1c]
jmp 0x456461
lea esi, [ebp - 0x1c]
jmp 0x4564c9
cmp eax, 3
jne 0x4565ef
mov edx, dword [ebp - 0x24]
mov eax, dword [edx + 0x4c]
mov ecx, dword [ebp - 0x28]
push eax
push ecx
call fcn.00444bd0
movzx esi, word [ebp + 8]
add esp, 8
test al, al
jne 0x4565b2
mov esi, 0xffff
lea ecx, [ebp - 0x20]
call fcn.00449890
pop ebx
pop edi
mov ax, si
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051d23b
mov esp, ebp
pop ebp
ret 4
lea ecx, [ebp - 0x20]
call fcn.00449890
mov ax, word [ebp + 8]
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051d23b
mov esp, ebp
pop ebp
ret 4
lea ecx, [ebp - 0x20]
call fcn.00449890
mov eax, 0xffff
pop ebx
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0051d23b
mov esp, ebp
pop ebp
ret 4