Function at 0x49d850
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x12f0
call fcn.005970f0
mov eax, dword [0x641a90]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 0x10]
push edi
push dword [ebp + 0x18]
mov dword [ebp - 0x1278], eax
push dword [esi + 0x20]
mov dword [ebp - 0x1280], ecx
push ebx
push ecx
push eax
mov dword [ebp - 0x1288], esi
mov dword [ebp - 0x12a8], ebx
mov dword [ebp - 0x1284], 0
mov dword [ebp - 0x127c], 0
call fcn.0049e460
movsx edi, word [esi + 0xe]
mov esi, dword [ebx + 0x18]
push 4
sar edi, 3
push esi
mov dword [ebp - 0x12a4], edi
call fcn.00592c0b
push 4
push esi
mov dword [ebp - 0x1290], eax
call fcn.00592c0b
mov ecx, eax
add esp, 0x24
mov eax, dword [ebp - 0x1290]
mov dword [ebp - 0x1298], ecx
test eax, eax
je 0x49def6
test ecx, ecx
je 0x49def6
push 6
push 0x1000
call fcn.00592c0b
add esp, 8
mov dword [ebp - 0x1274], eax
mov ecx, 0x80b2
test eax, eax
je 0x49ddcc
movzx eax, word [ebx + 0xe]
cmp eax, 3
je 0x49d987
cmp eax, 4
je 0x49d987
cmp eax, 7
jne 0x49d95e
mov eax, dword [ebp - 0x1280]
movsx eax, word [eax + 0xae]
push eax
lea eax, [ebp - 0x264]
push eax
call fcn.005436e0
mov esi, dword [ebp - 0x1278]
lea eax, [ebp - 0x264]
push esi
push eax
call fcn.00543850
add esp, 0x10
jmp 0x49d99f
cmp ax, cx
jne 0x49d999
lea eax, [ebp - 0x12f0]
push eax
call fcn.00543f20
mov esi, dword [ebp - 0x1278]
lea eax, [ebp - 0x12f0]
push esi
push eax
call fcn.00544010
add esp, 0xc
jmp 0x49d99f
mov esi, dword [ebp - 0x1278]
push ebx
push esi
call fcn.00542f00
add esp, 8
jmp 0x49d99f
mov esi, dword [ebp - 0x1278]
cmp dword [ebx + 0x18], 0
mov eax, dword [ebp - 0x1280]
mov dword [ebp - 0x1294], 0
mov ecx, dword [eax + 0x30]
mov dword [ebp - 0x129c], ecx
jle 0x49ddb1
mov eax, dword [ebp - 0x1290]
mov edx, dword [ebp - 0x1298]
sub edx, eax
mov dword [ebp - 0x128c], eax
mov dword [ebp - 0x12a0], edx
lea esp, [esp]
mov eax, dword [ebx + 0x14]
cmp ecx, eax
jge 0x49d9ec
mov dword [ebx + 0x14], ecx
jmp 0x49d9f4
sub ecx, eax
mov dword [ebp - 0x129c], ecx
push dword [esi]
call fcn.005960c7
mov ecx, dword [ebp - 0x128c]
add esp, 4
mov dword [ecx], eax
test al, 1
je 0x49da20
cmp word [ebx + 0xe], 7
je 0x49da20
inc eax
mov dword [ecx], eax
push dword [esi]
push 0
call fcn.005958b3
add esp, 8
movzx eax, word [ebx + 0xe]
cmp eax, 1
jne 0x49da78
push dword [ebx + 0x14]
push 0xffffffffffffffff
push dword [ebp - 0x1280]
call fcn.00459620
mov eax, dword [ebx + 0x1c]
push dword [esi]
imul eax, dword [ebx + 0x14]
push 1
push eax
mov eax, dword [ebp - 0x1288]
push dword [eax + 8]
call fcn.0059628c
dec eax
add esp, 0x1c
neg eax
sbb eax, eax
and eax, 6
mov esi, eax
mov eax, dword [ebx + 0x1c]
imul eax, dword [ebx + 0x14]
mov dword [ebp - 0x127c], esi
mov esi, dword [ebp - 0x1278]
jmp 0x49dd71
mov ecx, 0x8005
cmp ax, cx
jne 0x49dae7
push dword [ebx + 0x14]
push 0xffffffffffffffff
push dword [ebp - 0x1280]
call fcn.00459620
xor esi, esi
add esp, 0xc
cmp dword [ebx + 0x14], esi
jle 0x49dadc
mov ecx, dword [ebp - 0x127c]
test cx, cx
jne 0x49dadc
mov eax, dword [ebx + 0x1c]
lea ecx, [ebp - 0x1284]
push ecx
mov ecx, dword [ebp - 0x1288]
push eax
imul eax, esi
add eax, dword [ecx + 8]
push eax
push dword [ebp - 0x1278]
call fcn.0051d8d0
inc esi
movzx ecx, ax
add esp, 0x10
mov dword [ebp - 0x127c], ecx
cmp esi, dword [ebx + 0x14]
jl 0x49daa2
mov esi, dword [ebp - 0x1278]
jmp 0x49dd77
cmp eax, 3
je 0x49dced
cmp eax, 4
je 0x49dced
mov ecx, 0x80b2
cmp ax, cx
jne 0x49db7e
lea eax, [ebp - 0x12f0]
push eax
call fcn.00543fe0
add esp, 4
test eax, eax
je 0x49dc0f
push dword [ebx + 0x14]
push 0xffffffffffffffff
push dword [ebp - 0x1280]
call fcn.00459620
mov eax, dword [ebx + 0x1c]
imul eax, dword [ebx + 0x14]
push eax
mov eax, dword [ebp - 0x1288]
push dword [eax + 8]
lea eax, [ebp - 0x12f0]
push eax
call fcn.00543e80
mov esi, dword [ebp - 0x127c]
test eax, eax
mov eax, 6
cmove esi, eax
lea eax, [ebp - 0x1284]
push eax
lea eax, [ebp - 0x12f0]
mov dword [ebp - 0x127c], esi
push eax
call fcn.00543f60
mov esi, dword [ebp - 0x1278]
add esp, 0x20
jmp 0x49dd77
push dword [ebx + 0x14]
cmp eax, 7
jne 0x49dc1e
mov eax, dword [ebp - 0x1280]
push dword [eax + 0x2c]
lea eax, [ebp - 0x264]
push edi
push eax
call fcn.00543750
add esp, 0x10
test ax, ax
je 0x49dc0f
push dword [ebx + 0x14]
mov esi, dword [ebp - 0x1280]
push 0xffffffffffffffff
push esi
call fcn.00459620
push dword [ebx + 0x1c]
mov eax, dword [ebp - 0x1288]
push dword [ebx + 0x14]
push dword [esi + 0x2c]
push dword [eax + 8]
lea eax, [ebp - 0x264]
push eax
call fcn.00543660
mov esi, dword [ebp - 0x127c]
test ax, ax
mov eax, 6
cmove esi, eax
lea eax, [ebp - 0x1284]
push eax
lea eax, [ebp - 0x264]
mov dword [ebp - 0x127c], esi
push eax
call fcn.00543730
mov esi, dword [ebp - 0x1278]
add esp, 0x28
jmp 0x49dd77
mov dword [ebp - 0x127c], 0xb
jmp 0x49dd77
push 0xffffffffffffffff
push dword [ebp - 0x1280]
call fcn.00459620
add esp, 0xc
cmp word [ebx + 0x10], 0
je 0x49dcb1
mov eax, dword [ebp - 0x1288]
mov ecx, dword [ebx + 0x14]
mov dword [ebp - 0x127c], ecx
mov esi, dword [eax + 8]
test ecx, ecx
jle 0x49dcab
mov ebx, eax
lea ecx, [ecx]
mov eax, dword [ebx + 0x18]
sub eax, edi
test eax, eax
jle 0x49dc97
mov ecx, eax
lea edx, [esi + 2]
sub ecx, edi
add edx, ecx
mov cl, byte [edx - 2]
sub byte [edi + edx - 2], cl
cmp edi, 1
jle 0x49dc89
movzx ecx, byte [edx - 1]
sub byte [eax + esi + 1], cl
movzx ecx, byte [edx]
sub byte [eax + esi + 2], cl
cmp edi, 3
jle 0x49dc89
mov cl, byte [edx + 1]
sub byte [eax + esi + 3], cl
sub eax, edi
sub edx, edi
test eax, eax
jg 0x49dc62
mov ecx, dword [ebp - 0x127c]
add esi, dword [ebx + 0x18]
dec ecx
mov dword [ebp - 0x127c], ecx
test ecx, ecx
jg 0x49dc50
mov ebx, dword [ebp - 0x12a8]
mov esi, dword [ebp - 0x1278]
lea eax, [ebp - 0x1274]
push eax
lea eax, [ebp - 0x1284]
push eax
movzx eax, word [ebx + 0x14]
push eax
mov eax, dword [ebp - 0x1288]
push dword [ebx + 0x1c]
push dword [eax + 8]
push esi
call fcn.0049e2d0
movzx esi, ax
add esp, 0x18
mov dword [ebp - 0x127c], esi
mov esi, dword [ebp - 0x1278]
jmp 0x49dd77
push dword [ebx + 0x14]
push 0xffffffffffffffff
push dword [ebp - 0x1280]
call fcn.00459620
mov eax, dword [ebx]
add esp, 0xc
imul eax, dword [ebx + 0x14]
xor edx, edx
test eax, eax
jle 0x49dd29
mov edi, dword [ebp - 0x1288]
mov ecx, dword [edi + 8]
not byte [ecx + edx]
inc edx
mov eax, dword [ebx]
imul eax, dword [ebx + 0x14]
cmp edx, eax
jl 0x49dd12
mov edi, dword [ebp - 0x12a4]
push dword [esi]
call fcn.005960c7
push ebx
mov dword [ebp - 0x1284], eax
call fcn.00542ff0
mov eax, dword [ebx]
imul eax, dword [ebx + 0x14]
push ebx
push eax
mov eax, dword [ebp - 0x1288]
push dword [eax + 8]
call fcn.00542a40
movzx eax, ax
push ebx
mov dword [ebp - 0x127c], eax
call fcn.00542f80
push dword [esi]
call fcn.005960c7
add esp, 0x1c
sub eax, dword [ebp - 0x1284]
mov dword [ebp - 0x1284], eax
mov ecx, dword [ebp - 0x128c]
mov edx, dword [ebp - 0x12a0]
mov eax, dword [ebp - 0x1284]
mov dword [edx + ecx], eax
add ecx, 4
mov edx, dword [ebp - 0x1294]
inc edx
mov dword [ebp - 0x128c], ecx
mov ecx, dword [ebp - 0x129c]
mov dword [ebp - 0x1294], edx
cmp edx, dword [ebx + 0x18]
jl 0x49d9e0
push dword [ebp - 0x1274]
call fcn.00592c4b
mov esi, dword [ebp - 0x127c]
add esp, 4
mov ecx, 0x80b2
jmp 0x49ddd1
mov esi, 1
movzx eax, word [ebx + 0xe]
cmp eax, 3
je 0x49de94
cmp eax, 4
je 0x49de94
cmp ax, cx
jne 0x49ddfd
lea eax, [ebp - 0x12f0]
push eax
call fcn.00543ef0
jmp 0x49de9a
cmp eax, 7
jne 0x49de9d
mov edi, dword [ebp - 0x1278]
push dword [edi]
call fcn.005960c7
add esp, 4
mov dword [ebp - 0x128c], eax
test al, 1
je 0x49de32
push dword [edi]
push 0
call fcn.005958b3
add esp, 8
inc dword [ebp - 0x128c]
push dword [edi]
push 1
push dword [ebp - 0x24]
push dword [ebp - 0x20]
call fcn.0059628c
add esp, 0x10
test byte [ebp - 0x24], 1
je 0x49de56
push dword [edi]
push 0
call fcn.005958b3
add esp, 8
push 0
push dword [ebx + 0x2c]
push dword [edi]
call fcn.00595cb4
push dword [edi]
lea eax, [ebp - 0x24]
push 1
push 4
push eax
call fcn.0059628c
push dword [edi]
lea eax, [ebp - 0x128c]
push 1
push 4
push eax
call fcn.0059628c
lea eax, [ebp - 0x264]
push eax
call fcn.005436b0
add esp, 0x30
jmp 0x49dea3
push ebx
call fcn.00542e50
add esp, 4
mov edi, dword [ebp - 0x1278]
push 0
push dword [ebx + 0x20]
push dword [edi]
call fcn.00595cb4
push dword [edi]
push 4
push dword [ebx + 0x18]
push dword [ebp - 0x1290]
call fcn.0059628c
push 0
push dword [ebx + 0x24]
push dword [edi]
call fcn.00595cb4
push dword [edi]
push 4
push dword [ebx + 0x18]
mov ebx, dword [ebp - 0x1298]
push ebx
call fcn.0059628c
push dword [ebp - 0x1290]
call fcn.00592c4b
push ebx
call fcn.00592c4b
add esp, 0x40
jmp 0x49df08
mov esi, 1
test eax, eax
je 0x49df08
push eax
call fcn.00592c4b
add esp, 4
push dword [ebp - 0x1280]
call fcn.00454fa0
mov ecx, dword [ebp - 4]
add esp, 4
mov ax, si
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.005920c1
mov esp, ebp
pop ebp
ret