Function at 0x1005ba9
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x450
mov eax, dword [ebp + 0xc]
xor ecx, ecx
push ebx
mov bx, word [eax]
cmp bx, cx
mov dword [ebp - 8], ecx
mov dword [ebp - 0x14], ecx
je 0x1005f19
push esi
push edi
jmp 0x10057d9
mov ecx, dword [ebp - 0x38]
push 2
pop esi
add dword [ebp + 0xc], esi
xor eax, eax
cmp dword [ebp - 0x14], eax
jl 0x1005f17
cmp bx, 0x20
jb 0x1005803
cmp bx, 0x78
ja 0x1005803
movzx eax, bx
movsx eax, byte [eax + 0x1001838]
and eax, 0xf
movsx eax, byte [ecx + eax*8 + 0x1001858]
push 7
sar eax, 4
pop ecx
cmp eax, ecx
mov dword [ebp - 0x38], eax
ja case.default.0x100581c
jmp dword [eax*4 + 0x1005f1f]
xor eax, eax
or dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], eax
mov dword [ebp - 0x1c], eax
jmp case.default.0x100581c
movzx eax, bx
sub eax, 0x20
je 0x1005883
sub eax, 3
je 0x100587a
sub eax, 8
je 0x1005871
sub eax, esi
je 0x1005868
sub eax, 3
jne case.default.0x100581c
or dword [ebp - 4], 8
jmp case.default.0x100581c
or dword [ebp - 4], 4
jmp case.default.0x100581c
or dword [ebp - 4], 1
jmp case.default.0x100581c
or byte [ebp - 4], 0x80
jmp case.default.0x100581c
or dword [ebp - 4], esi
jmp case.default.0x100581c
cmp bx, 0x2a
jne 0x10058b2
add dword [ebp + 0x10], 4
mov eax, dword [ebp + 0x10]
mov eax, dword [eax - 4]
test eax, eax
mov dword [ebp - 0x20], eax
jge case.default.0x100581c
or dword [ebp - 4], 4
neg dword [ebp - 0x20]
jmp case.default.0x100581c
mov eax, dword [ebp - 0x20]
movzx ecx, bx
lea eax, [eax + eax*4]
lea eax, [ecx + eax*2 - 0x30]
mov dword [ebp - 0x20], eax
jmp case.default.0x100581c
and dword [ebp - 0x10], 0
jmp case.default.0x100581c
cmp bx, 0x2a
jne 0x10058f4
add dword [ebp + 0x10], 4
mov eax, dword [ebp + 0x10]
mov eax, dword [eax - 4]
test eax, eax
mov dword [ebp - 0x10], eax
jge case.default.0x100581c
or dword [ebp - 0x10], 0xffffffff
jmp case.default.0x100581c
mov eax, dword [ebp - 0x10]
movzx ecx, bx
lea eax, [eax + eax*4]
lea eax, [ecx + eax*2 - 0x30]
mov dword [ebp - 0x10], eax
jmp case.default.0x100581c
movzx eax, bx
cmp eax, 0x49
je 0x100593f
cmp eax, 0x68
je 0x1005936
cmp eax, 0x6c
je 0x100592d
cmp eax, 0x77
jne case.default.0x100581c
or byte [ebp - 3], 8
jmp case.default.0x100581c
or dword [ebp - 4], 0x10
jmp case.default.0x100581c
or dword [ebp - 4], 0x20
jmp case.default.0x100581c
mov ecx, dword [ebp + 0xc]
mov ax, word [ecx]
cmp ax, 0x36
jne 0x1005961
cmp word [ecx + 2], 0x34
jne 0x1005961
add ecx, 4
or byte [ebp - 3], 0x80
mov dword [ebp + 0xc], ecx
jmp case.default.0x100581c
cmp ax, 0x33
jne 0x100597d
cmp word [ecx + 2], 0x32
jne 0x100597d
add ecx, 4
and byte [ebp - 3], 0x7f
mov dword [ebp + 0xc], ecx
jmp case.default.0x100581c
cmp ax, 0x64
je case.default.0x100581c
cmp ax, 0x69
je case.default.0x100581c
cmp ax, 0x6f
je case.default.0x100581c
cmp ax, 0x75
je case.default.0x100581c
cmp ax, 0x78
je case.default.0x100581c
cmp ax, 0x58
je case.default.0x100581c
and dword [ebp - 0x38], 0
mov eax, dword [ebp + 8]
push ebx
lea esi, [ebp - 0x14]
mov dword [ebp - 0x1c], 1
call fcn.0100572a
pop ecx
jmp case.default.0x100581c
movzx eax, bx
cmp eax, 0x67
jg 0x1005c53
cmp eax, 0x65
jge 0x1005a96
cmp eax, 0x58
jg 0x1005b09
je 0x1005cc8
sub eax, 0x43
je 0x1005aba
sub eax, esi
je 0x1005a8c
sub eax, esi
je 0x1005a8c
sub eax, 0xc
jne 0x1005e09
test word [ebp - 4], 0x830
jne 0x1005a24
or dword [ebp - 4], 0x20
mov edx, dword [ebp - 0x10]
cmp edx, 0xffffffff
jne 0x1005a31
mov edx, 0x7fffffff
add dword [ebp + 0x10], 4
test byte [ebp - 4], 0x20
mov eax, dword [ebp + 0x10]
mov eax, dword [eax - 4]
mov dword [ebp - 0xc], eax
je 0x1005c92
test eax, eax
jne 0x1005a54
mov eax, dword [0x1008410]
mov dword [ebp - 0xc], eax
and dword [ebp - 8], 0
test edx, edx
mov eax, dword [ebp - 0xc]
jle 0x1005e09
mov cl, byte [eax]
test cl, cl
je 0x1005e09
mov esi, dword [0x100843c]
movzx ecx, cl
test byte [esi + ecx*2 + 1], 0x80
je 0x1005a7e
inc eax
inc eax
inc dword [ebp - 8]
cmp dword [ebp - 8], edx
jl 0x1005a63
jmp 0x1005e09
mov dword [ebp - 0x3c], 1
add ebx, 0x20
or dword [ebp - 4], 0x40
xor edi, edi
cmp dword [ebp - 0x10], edi
lea eax, [ebp - 0x450]
mov dword [ebp - 0xc], eax
jge 0x1005bb2
mov dword [ebp - 0x10], 6
jmp 0x1005bc1
test word [ebp - 4], 0x830
jne 0x1005ac6
or dword [ebp - 4], 0x20
add dword [ebp + 0x10], 4
mov eax, dword [ebp + 0x10]
movzx eax, word [eax - 4]
xor esi, esi
inc esi
test byte [ebp - 4], 0x20
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x40], eax
je 0x1005b48
push dword [0x1008430]
and byte [ebp - 0x27], 0
mov byte [ebp - 0x28], al
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x450]
push eax
call fcn.01006965
add esp, 0xc
test eax, eax
jge 0x1005b4f
mov dword [ebp - 0x30], esi
jmp 0x1005b4f
sub eax, 0x5a
je 0x1005b60
sub eax, 9
je 0x1005ac6
dec eax
jne 0x1005e09
or dword [ebp - 4], 0x40
mov dword [ebp - 8], 0xa
mov ebx, dword [ebp - 4]
mov esi, 0x8000
test esi, ebx
je 0x1005d38
mov ecx, dword [ebp + 0x10]
mov eax, dword [ecx]
mov edx, dword [ecx + 4]
add ecx, 8
mov dword [ebp + 0x10], ecx
jmp 0x1005d60
mov word [ebp - 0x450], ax
lea eax, [ebp - 0x450]
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], esi
jmp 0x1005e09
add dword [ebp + 0x10], 4
mov eax, dword [ebp + 0x10]
mov eax, dword [eax - 4]
test eax, eax
je 0x1005b9b
mov ecx, dword [eax + 4]
test ecx, ecx
je 0x1005b9b
test byte [ebp - 3], 8
movsx eax, word [eax]
mov dword [ebp - 0xc], ecx
je 0x1005b92
cdq
sub eax, edx
sar eax, 1
mov dword [ebp - 0x1c], 1
jmp 0x1005e06
and dword [ebp - 0x1c], 0
jmp 0x1005e06
mov eax, dword [0x1008410]
mov dword [ebp - 0xc], eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1005ba6
jmp 0x1005c4c
jne 0x1005bc1
cmp bx, 0x67
jne 0x1005bc1
mov dword [ebp - 0x10], 1
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
push dword [ebp - 0x3c]
add eax, 8
push dword [ebp - 0x10]
mov dword [ebp + 0x10], eax
mov eax, dword [eax - 4]
mov dword [ebp - 0x4c], eax
movsx eax, bl
push eax
lea eax, [ebp - 0x450]
push eax
lea eax, [ebp - 0x50]
push eax
mov dword [ebp - 0x50], ecx
call dword [0x1008418]
mov esi, dword [ebp - 4]
add esp, 0x14
and esi, 0x80
je 0x1005c11
cmp dword [ebp - 0x10], edi
jne 0x1005c11
lea eax, [ebp - 0x450]
push eax
call dword [0x1008424]
pop ecx
cmp bx, 0x67
jne 0x1005c29
cmp esi, edi
jne 0x1005c29
lea eax, [ebp - 0x450]
push eax
call dword [0x100841c]
pop ecx
cmp byte [ebp - 0x450], 0x2d
jne 0x1005c3f
or byte [ebp - 3], 1
lea eax, [ebp - 0x44f]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1005c45
sub eax, edx
jmp 0x1005e06
sub eax, 0x69
je 0x1005b1a
sub eax, 5
je 0x1005d0e
dec eax
je 0x1005cf4
dec eax
je 0x1005cc1
sub eax, 3
je 0x1005a24
sub eax, esi
je 0x1005b1e
sub eax, 3
jne 0x1005e09
mov dword [ebp - 0x2c], 0x27
jmp 0x1005ccb
test eax, eax
jne 0x1005c9e
mov eax, dword [0x1008414]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x1c], 1
jmp 0x1005cb3
dec edx
cmp word [eax], 0
je 0x1005cb7
add eax, esi
test edx, edx
jne 0x1005caa
sub eax, dword [ebp - 0xc]
sar eax, 1
jmp 0x1005e06
mov dword [ebp - 0x10], 8
mov dword [ebp - 0x2c], ecx
test byte [ebp - 4], 0x80
mov dword [ebp - 8], 0x10
je 0x1005b25
mov eax, dword [ebp - 0x2c]
add eax, 0x51
mov word [ebp - 0x24], 0x30
mov word [ebp - 0x22], ax
mov dword [ebp - 0x18], esi
jmp 0x1005b25
test byte [ebp - 4], 0x80
mov dword [ebp - 8], 8
je 0x1005b25
or byte [ebp - 3], 2
jmp 0x1005b25
add dword [ebp + 0x10], 4
test byte [ebp - 4], 0x20
mov eax, dword [ebp + 0x10]
mov eax, dword [eax - 4]
je 0x1005d27
mov cx, word [ebp - 0x14]
mov word [eax], cx
jmp 0x1005d2c
mov ecx, dword [ebp - 0x14]
mov dword [eax], ecx
mov dword [ebp - 0x30], 1
jmp case.default.0x100581c
add dword [ebp + 0x10], 4
test bl, 0x20
mov eax, dword [ebp + 0x10]
je 0x1005d56
test bl, 0x40
je 0x1005d50
movsx eax, word [eax - 4]
cdq
jmp 0x1005d60
movzx eax, word [eax - 4]
jmp 0x1005d4d
test bl, 0x40
mov eax, dword [eax - 4]
jne 0x1005d4d
xor edx, edx
test bl, 0x40
je 0x1005d7a
test edx, edx
jg 0x1005d7a
jl 0x1005d6f
test eax, eax
jae 0x1005d7a
neg eax
adc edx, 0
neg edx
or byte [ebp - 3], 1
test dword [ebp - 4], esi
mov ebx, eax
mov edi, edx
jne 0x1005d85
xor edi, edi
cmp dword [ebp - 0x10], 0
jge 0x1005d94
mov dword [ebp - 0x10], 1
jmp 0x1005d98
and dword [ebp - 4], 0xfffffff7
mov eax, ebx
or eax, edi
jne 0x1005da2
and dword [ebp - 0x18], 0
lea esi, [ebp - 0x251]
mov eax, dword [ebp - 0x10]
dec dword [ebp - 0x10]
test eax, eax
jg 0x1005db8
mov eax, ebx
or eax, edi
je 0x1005ddc
mov eax, dword [ebp - 8]
cdq
push edx
push eax
push edi
push ebx
call fcn.01006a30
add ecx, 0x30
cmp ecx, 0x39
mov dword [ebp - 0x44], ebx
mov ebx, eax
mov edi, edx
jle 0x1005dd7
add ecx, dword [ebp - 0x2c]
mov byte [esi], cl
dec esi
jmp 0x1005da8
lea eax, [ebp - 0x251]
sub eax, esi
inc esi
test byte [ebp - 3], 2
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], esi
je 0x1005e09
mov ecx, esi
cmp byte [ecx], 0x30
jne 0x1005dfc
test eax, eax
jne 0x1005e09
dec dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov byte [ecx], 0x30
inc eax
mov dword [ebp - 8], eax
cmp dword [ebp - 0x30], 0
jne case.default.0x100581c
mov ecx, dword [ebp - 4]
test cl, 0x40
je 0x1005e4c
test ch, 1
je 0x1005e28
mov word [ebp - 0x24], 0x2d
jmp 0x1005e45
xor eax, eax
inc eax
test al, cl
je 0x1005e3a
mov word [ebp - 0x24], 0x2b
mov dword [ebp - 0x18], eax
jmp 0x1005e4c
test cl, 2
je 0x1005e4c
mov word [ebp - 0x24], 0x20
mov dword [ebp - 0x18], 1
mov ebx, dword [ebp - 0x20]
sub ebx, dword [ebp - 0x18]
sub ebx, dword [ebp - 8]
test cl, 0xc
jne 0x1005e6b
push dword [ebp + 8]
lea eax, [ebp - 0x14]
push ebx
push 0x20
call fcn.0100574f
add esp, 0xc
push dword [ebp - 0x18]
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x14]
lea ecx, [ebp - 0x24]
call fcn.01005774
test byte [ebp - 4], 8
pop ecx
je 0x1005e98
test byte [ebp - 4], 4
jne 0x1005e98
push edi
push ebx
push 0x30
lea eax, [ebp - 0x14]
call fcn.0100574f
add esp, 0xc
cmp dword [ebp - 0x1c], 0
jne 0x1005ee2
mov eax, dword [ebp - 8]
test eax, eax
jle 0x1005ee2
mov edi, dword [ebp - 0xc]
mov dword [ebp - 0x34], eax
push dword [0x1008430]
dec dword [ebp - 0x34]
lea eax, [ebp - 0x40]
push edi
push eax
call fcn.01006965
add esp, 0xc
test eax, eax
mov dword [ebp - 0x44], eax
jle 0x1005ef1
push dword [ebp - 0x40]
mov eax, dword [ebp + 8]
lea esi, [ebp - 0x14]
call fcn.0100572a
add edi, dword [ebp - 0x44]
cmp dword [ebp - 0x34], 0
pop ecx
jg 0x1005eab
jmp 0x1005ef1
push dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
lea eax, [ebp - 0x14]
call fcn.01005774
pop ecx
test byte [ebp - 4], 4
je case.default.0x100581c
push dword [ebp + 8]
lea eax, [ebp - 0x14]
push ebx
push 0x20
call fcn.0100574f
add esp, 0xc
mov eax, dword [ebp + 0xc]
mov bx, word [eax]
test bx, bx
jne 0x10057d6
pop edi
pop esi
mov eax, dword [ebp - 0x14]
pop ebx
leave
ret