Function at 0x50cff9
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10053556
mov eax, dword fs:[0]
push eax
mov eax, 0x4180
call fcn.00517520
mov eax, dword [0x10062108]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 4
push 9
xor ebx, ebx
mov word [ebp - 0x68], bx
pop ecx
xor eax, eax
lea edi, [ebp - 0x66]
rep stosd dword es:[edi], eax
mov esi, 0x1005818c
push esi
mov byte [ebp - 0x411d], bl
stosw word es:[edi], ax
call fcn.00511a55
pop ecx
push eax
push esi
lea eax, [ebp + 0x24]
call fcn.004e752a
cmp eax, 0xffffffff
jne 0x50d0ca
xor esi, esi
inc esi
push ebx
push esi
lea ecx, [ebp + 8]
mov byte [ebp - 4], 3
call fcn.004e75b8
push ebx
push esi
lea ecx, [ebp + 0x24]
mov byte [ebp - 4], 2
call fcn.004e75b8
push ebx
push esi
lea ecx, [ebp + 0x40]
mov byte [ebp - 4], 1
call fcn.004e75b8
push ebx
push esi
lea ecx, [ebp + 0x5c]
mov byte [ebp - 4], bl
call fcn.004e75b8
or dword [ebp - 4], 0xffffffff
push ebx
push esi
lea ecx, [ebp + 0x78]
call fcn.004e038c
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.005116e0
leave
ret
mov ecx, dword [ebp + 0x38]
push 7
sub ecx, eax
pop edx
cmp ecx, edx
ja 0x50d0d8
mov edx, ecx
cmp dword [ebp + 0x3c], 8
mov ecx, dword [ebp + 0x28]
jae 0x50d0e4
lea ecx, [ebp + 0x28]
add edx, edx
push edx
lea eax, [ecx + eax*2]
push eax
lea eax, [ebp - 0x68]
push eax
call fcn.005116f0
add esp, 0xc
xor edx, edx
lea eax, [ebp + edx*2 - 0x68]
movzx ecx, word [eax]
cmp cx, 0x21
je 0x50d065
lea edi, [ecx - 0x41]
cmp di, 0x19
ja 0x50d119
add ecx, 0x20
mov word [eax], cx
inc edx
cmp edx, 7
jl 0x50d0f9
lea eax, [ebp - 0x68]
push esi
push eax
call fcn.00512886
lea eax, [ebp - 0x68]
push eax
call fcn.00511a55
add esp, 0xc
push eax
lea eax, [ebp - 0x68]
push eax
xor eax, eax
mov ecx, 0x100653ec
call fcn.004e747e
or edi, 0xffffffff
cmp eax, edi
jne 0x50d16e
cmp dword [ebp + 0x38], 0x2d
jne 0x50d1bd
lea eax, [ebp - 0x68]
push 0x1005a660
push eax
call fcn.00516cf4
test eax, eax
pop ecx
pop ecx
jne 0x50d1bd
mov byte [ebp - 0x411d], 1
cmp dword [ebp + 0x20], 8
mov eax, dword [ebp + 0xc]
jae 0x50d17a
lea eax, [ebp + 0xc]
push ebx
push ebx
push 3
push ebx
xor esi, esi
inc esi
push esi
push 0x80000000
push eax
call dword [0x10055080]
cmp eax, edi
mov dword [ebp - 0x4128], eax
jne 0x50d221
push 0x10058198
lea eax, [ebp + 0x40]
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.004ebce0
add esp, 0xc
cmp dword [eax + 0x18], 8
jb 0x50d20b
mov eax, dword [eax + 4]
jmp 0x50d20e
xor esi, esi
inc esi
push ebx
push esi
lea ecx, [ebp + 8]
mov byte [ebp - 4], 3
call fcn.004e75b8
push ebx
push esi
lea ecx, [ebp + 0x24]
mov byte [ebp - 4], 2
call fcn.004e75b8
push ebx
push esi
lea ecx, [ebp + 0x40]
mov byte [ebp - 4], 1
call fcn.004e75b8
push ebx
push esi
lea ecx, [ebp + 0x5c]
mov byte [ebp - 4], bl
call fcn.004e75b8
push ebx
push esi
lea ecx, [ebp + 0x78]
mov dword [ebp - 4], edi
call fcn.004e038c
mov eax, edi
jmp 0x50d0b0
add eax, 4
push eax
call dword [0x1005503c]
push ebx
push esi
lea ecx, [ebp - 0x30]
call fcn.004e75b8
jmp 0x50d1c0
xor eax, eax
mov dword [ebp - 0x4164], ebx
lea edi, [ebp - 0x4160]
stosd dword es:[edi], eax
lea eax, [ebp - 0x4164]
push eax
push dword [ebp - 0x4128]
call dword [0x100550a8]
test eax, eax
jne 0x50d28c
push dword [ebp - 0x4128]
call dword [0x100550d8]
push 0x10058198
lea eax, [ebp + 0x40]
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.004ebce0
add esp, 0xc
cmp dword [eax + 0x18], 8
jb 0x50d273
mov eax, dword [eax + 4]
jmp 0x50d276
add eax, 4
push eax
call dword [0x1005503c]
push ebx
push esi
lea ecx, [ebp - 0x30]
call fcn.004e75b8
jmp 0x50d068
mov eax, dword [ebp - 0x4164]
mov ecx, dword [ebp - 0x4160]
mov edx, eax
or edx, ecx
mov dword [ebp - 0x4154], eax
mov dword [ebp - 0x4150], ecx
jne 0x50d2bb
push dword [ebp - 0x4128]
call dword [0x100550d8]
jmp 0x50d068
cmp ecx, 0xf00ff00
jl 0x50d2cc
jg 0x50d2aa
cmp eax, 0xff00ff00
jae 0x50d2aa
push ecx
push eax
call fcn.0050cf83
pop ecx
pop ecx
mov edi, eax
cdq
mov ecx, eax
add ecx, dword [ebp - 0x4154]
mov dword [ebp - 0x4140], edx
push dword [ebp - 0x4140]
adc edx, dword [ebp - 0x4150]
sub ecx, esi
push eax
sbb edx, ebx
push edx
push ecx
mov dword [ebp - 0x414c], edi
call fcn.0052e140
push 0xffffffffffffffff
mov dword [ebp - 0x4158], eax
push ebx
lea eax, [ebp + 8]
push eax
mov ecx, 0x10065408
mov dword [0x100653c4], ebx
call fcn.004e737d
push edi
call fcn.00512196
mov dword [ebp - 0x412c], eax
mov eax, dword [ebp - 0x4158]
xor ecx, ecx
push 0x14
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00512196
pop ecx
mov dword [ebp - 0x4138], eax
pop ecx
lea eax, [ebp - 0x411c]
push eax
call fcn.004f7470
push ebx
lea eax, [ebp - 0x4124]
push eax
push edi
push dword [ebp - 0x412c]
mov edi, dword [0x1005507c]
push dword [ebp - 0x4128]
mov dword [ebp - 0x4144], ebx
mov dword [ebp - 0x4140], ebx
mov dword [ebp - 0x4124], ebx
call edi
cmp dword [ebp + 0x3c], 8
mov eax, dword [ebp + 0x28]
jae 0x50d396
lea eax, [ebp + 0x28]
push eax
call fcn.0050e486
pop ecx
mov dword [ebp - 0x4134], eax
mov byte [ebp - 4], 5
mov esi, dword [eax + 0xc]
lea eax, [ebp - 0x7c]
mov dword [ebp - 0x4148], esi
call fcn.0050d96e
cmp byte [ebp - 0x411d], bl
je 0x50d3d5
push 4
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp - 0x416c]
push eax
call fcn.005116f0
add esp, 0xc
cmp dword [ebp - 0x4124], ebx
jbe 0x50d539
mov eax, dword [ebp - 0x4138]
mov dword [ebp - 0x4130], eax
cmp byte [0x100653b5], bl
je 0x50d59b
cmp byte [ebp - 0x411d], bl
je 0x50d488
cmp dword [ebp - 0x4124], ebx
mov dword [ebp - 0x415c], ebx
jbe 0x50d488
mov eax, dword [ebp - 0x4124]
mov esi, 0x4000
sub eax, ebx
cmp eax, esi
mov ecx, esi
ja 0x50d428
mov ecx, eax
push dword [ebp - 0x416c]
mov eax, dword [ebp - 0x412c]
push ecx
lea ecx, [ebp - 0x407c]
add eax, ebx
push ecx
push eax
mov dword [ebp - 0x4168], eax
call fcn.0050eb10
mov eax, dword [ebp - 0x4124]
sub eax, ebx
add esp, 0x10
cmp eax, esi
jbe 0x50d45b
mov eax, esi
push eax
lea eax, [ebp - 0x407c]
push eax
push dword [ebp - 0x4168]
call fcn.005116f0
add esp, 0xc
inc dword [ebp - 0x415c]
mov ebx, dword [ebp - 0x415c]
shl ebx, 0xe
cmp ebx, dword [ebp - 0x4124]
jb 0x50d413
lea eax, [ebp - 0x411c]
call fcn.004f717a
push dword [ebp - 0x4124]
mov eax, dword [ebp - 0x412c]
lea esi, [ebp - 0x411c]
call fcn.004f71b8
mov ebx, dword [ebp - 0x4130]
pop ecx
call fcn.004f7480
mov eax, dword [ebp - 0x4144]
add dword [ebp - 0x4130], 0x14
add eax, dword [ebp - 0x4124]
push 0
pop esi
adc dword [ebp - 0x4140], esi
push esi
push 0x64
push dword [ebp - 0x4140]
mov dword [ebp - 0x4144], eax
push eax
call fcn.0051f700
push dword [ebp - 0x4150]
push dword [ebp - 0x4154]
push edx
push eax
call fcn.0052e140
mov dword [0x100653c4], eax
mov eax, dword [ebp - 0x414c]
sar eax, 9
push eax
call dword [0x10055010]
push esi
lea eax, [ebp - 0x4124]
push eax
push dword [ebp - 0x414c]
push dword [ebp - 0x412c]
push dword [ebp - 0x4128]
call edi
xor ebx, ebx
cmp dword [ebp - 0x4124], esi
ja 0x50d3ed
push dword [ebp - 0x4128]
call dword [0x100550d8]
cmp byte [ebp - 0x411d], bl
je 0x50d661
lea eax, [ebp - 0x411c]
push eax
call fcn.004f7470
mov eax, dword [ebp - 0x4158]
imul eax, eax, 0x14
push eax
mov eax, dword [ebp - 0x4138]
lea esi, [ebp - 0x411c]
call fcn.004f71b8
pop ecx
lea ebx, [ebp - 0x28]
call fcn.004f7480
mov eax, ebx
push eax
lea ebx, [ebp - 0x4188]
call fcn.0050d8fa
cmp dword [eax + 0x18], 0x10
pop ecx
jb 0x50d5f2
mov eax, dword [eax + 4]
jmp 0x50d5f5
push dword [ebp - 0x4128]
call dword [0x100550d8]
push 0x10058198
lea eax, [ebp + 0x40]
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.004ebce0
add esp, 0xc
cmp dword [eax + 0x18], 8
jb 0x50d5c7
mov eax, dword [eax + 4]
jmp 0x50d5ca
add eax, 4
push eax
call dword [0x1005503c]
xor esi, esi
push ebx
inc esi
push esi
lea ecx, [ebp - 0x30]
call fcn.004e75b8
mov byte [ebp - 4], 4
mov edi, dword [ebp - 0x4134]
call fcn.004e127e
jmp 0x50d068
add eax, 4
push 0x28
push dword [ebp - 0x4148]
push eax
call fcn.00512ac2
add esp, 0xc
push 0
test eax, eax
push 1
lea ecx, [ebp - 0x4188]
setne bl
call fcn.004e038c
test bl, bl
je 0x50d65f
cmp dword [ebp + 0x20], 8
mov eax, dword [ebp + 0xc]
jae 0x50d62a
lea eax, [ebp + 0xc]
push eax
call fcn.00514142
push dword [ebp - 0x4138]
call fcn.00512abd
push dword [ebp - 0x412c]
call fcn.00512abd
mov byte [ebp - 4], 4
mov edi, dword [ebp - 0x4134]
add esp, 0xc
call fcn.004e127e
xor ebx, ebx
jmp 0x50d065
xor ebx, ebx
push 0x10058198
lea eax, [ebp + 0x40]
push eax
lea eax, [ebp - 0x4188]
push eax
call fcn.004ebce0
add esp, 0xc
cmp dword [eax + 0x18], 8
jb 0x50d684
mov eax, dword [eax + 4]
jmp 0x50d687
add eax, 4
push 0x1005a670
push eax
call fcn.005159e5
pop ecx
pop ecx
push ebx
mov edi, eax
push 1
lea ecx, [ebp - 0x4188]
mov dword [ebp - 0x4130], edi
call fcn.004e75b8
cmp edi, ebx
jne 0x50d727
push dword [ebp - 0x4138]
call fcn.00512abd
push dword [ebp - 0x412c]
call fcn.00512abd
pop ecx
pop ecx
or esi, 0xffffffff
mov byte [ebp - 4], 4
mov edi, dword [ebp - 0x4134]
call fcn.004e127e
xor edi, edi
push ebx
inc edi
push edi
lea ecx, [ebp + 8]
mov byte [ebp - 4], 3
call fcn.004e75b8
push ebx
push edi
lea ecx, [ebp + 0x24]
mov byte [ebp - 4], 2
call fcn.004e75b8
push ebx
push edi
lea ecx, [ebp + 0x40]
mov byte [ebp - 4], 1
call fcn.004e75b8
push ebx
push edi
lea ecx, [ebp + 0x5c]
mov byte [ebp - 4], bl
call fcn.004e75b8
or dword [ebp - 4], 0xffffffff
push ebx
push edi
lea ecx, [ebp + 0x78]
call fcn.004e038c
mov eax, esi
jmp 0x50d0b0
push 0x1005a678
push edi
call fcn.00516593
push dword [ebp - 0x4150]
push dword [ebp - 0x4154]
push 0x1005a690
push edi
call fcn.00516593
mov esi, dword [ebp - 0x4158]
imul esi, esi, 0x14
add esp, 0x18
push esi
push dword [ebp - 0x414c]
push dword [ebp - 0x4148]
push dword [ebp - 0x4148]
call fcn.00512260
pop ecx
push eax
push 0x1005a6a0
push edi
call fcn.00516593
push edi
push esi
push 1
push dword [ebp - 0x4138]
call fcn.00514f94
mov byte [ebp - 0x40], bl
xor eax, eax
lea edi, [ebp - 0x3f]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
push ebx
stosb byte es:[edi], al
call fcn.00512425
push edx
push eax
push 0x1005844c
lea eax, [ebp - 0x40]
push 0x10
push eax
call fcn.00512216
add esp, 0x40
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x40b4]
call fcn.004e07b7
lea eax, [ebp + 0x78]
push eax
lea eax, [ebp - 0x4098]
push eax
mov byte [ebp - 4], 6
call fcn.0050e642
pop ecx
pop ecx
mov byte [ebp - 4], 7
cmp dword [ebp + 0x74], 8
mov eax, dword [ebp + 0x60]
jae 0x50d7e7
lea eax, [ebp + 0x60]
push eax
call fcn.0050e486
mov edi, dword [ebp - 0x4134]
mov esi, eax
cmp edi, esi
pop ecx
je 0x50d805
call fcn.004e127e
mov dword [ebp - 0x4134], esi
cmp dword [ebp - 0x409c], 0x10
mov eax, dword [ebp - 0x4134]
mov eax, dword [eax + 0xc]
mov ecx, dword [ebp - 0x40b0]
jae 0x50d823
lea ecx, [ebp - 0x40b0]
cmp dword [ebp - 0x4080], 0x10
mov edi, dword [ebp - 0x4094]
jae 0x50d838
lea edi, [ebp - 0x4094]
mov esi, dword [ebp - 0x4084]
push ecx
push dword [ebp - 0x40a0]
push eax
push eax
call fcn.00512260
pop ecx
push eax
push edi
push esi
push 0x1005a6cc
push dword [ebp - 0x4130]
call fcn.00516593
push dword [ebp - 0x4130]
call fcn.00511d1b
push dword [ebp - 0x4138]
call fcn.00512abd
push dword [ebp - 0x412c]
call fcn.00512abd
add esp, 0x2c
push ebx
push 1
lea ecx, [ebp - 0x4098]
mov byte [ebp - 4], 6
call fcn.004e038c
push ebx
push 1
lea ecx, [ebp - 0x40b4]
mov byte [ebp - 4], 5
call fcn.004e038c
xor esi, esi
jmp 0x50d6c9