Function at 0x408760
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x448d3b
mov eax, dword fs:[0]
push eax
sub esp, 0x2bc
mov eax, dword [0x461068]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov dword [ebp - 0x29c], esi
mov ebx, ecx
mov dword [ebp - 0x2a0], ebx
push 0x200
lea eax, [ebp - 0x270]
mov byte [ebp - 0x271], 0
push 0
push eax
call fcn.00427180
add esp, 0xc
push 0x200
push 0
push 0x463c70
call fcn.00427180
add esp, 0xc
mov dword [ebp - 0x298], 3
xor eax, eax
mov edx, esi
mov ecx, ebx
mov dword [esi + 0xe], eax
mov word [esi + 0x12], ax
push 3
mov dword [esi + 4], eax
call fcn.00407d30
xorps xmm0, xmm0
mov dword [ebp - 0x1c], 0
movq qword [ebp - 0x24], xmm0
add esp, 4
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
push 0x463c5c
push 0x4024c0
mov dword [ebp - 4], 0
push 0x463c64
mov dword [ebp - 0x18], 0
call fcn.0040e022
add esp, 0xc
test eax, eax
je 0x4091c7
lea eax, [ebp - 0x18]
mov dword [ebp - 0x14], 0x463c5c
push eax
push 3
push 0x461dec
lea ecx, [ebp - 0x2c]
call fcn.0040a9b0
mov esi, dword [ebp - 0x28]
xorps xmm0, xmm0
movlpd qword [ebp - 0x18], xmm0
test esi, esi
je 0x408874
lock inc dword [esi + 4]
mov esi, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x2c]
mov edi, esi
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], edi
test esi, esi
je 0x40888a
lock inc dword [esi + 4]
mov esi, dword [ebp - 0x28]
movlpd qword [ebp - 0x34], xmm0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
mov byte [ebp - 4], 4
test esi, esi
je 0x4088c9
or eax, 0xffffffff
lock xadd dword [esi + 4], eax
jne 0x4088c6
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
or eax, 0xffffffff
lock xadd dword [esi + 8], eax
jne 0x4088c6
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov esi, dword [ebp - 0x28]
lea edx, [ebp - 0x34]
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x18]
call fcn.0040a310
test al, al
je 0x408aa7
lea eax, [ebx + 0x20]
push eax
lea ecx, [ebp - 0x4c]
call fcn.004028b0
lea eax, [ebp - 0x288]
mov byte [ebp - 4], 6
push eax
lea ecx, [ebp - 0x4c]
call fcn.0040ac10
add esp, 4
movq xmm0, qword [eax]
mov edx, dword [eax + 8]
movq qword [ebp - 0x2c4], xmm0
mov eax, dword [ebp - 0x2c4]
test edx, edx
je 0x408929
cmp eax, 1
je 0x408929
cmp eax, 9
jne 0x4091cc
cmp eax, 2
jne 0x408a44
lea eax, [ebp - 0x2b8]
push eax
lea ecx, [ebp - 0x4c]
call fcn.0040a210
push eax
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 7
call fcn.004028b0
mov byte [ebp - 4], 9
mov edx, dword [ebp - 0x2a4]
cmp edx, 8
jb 0x408992
mov ecx, dword [ebp - 0x2b8]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x408988
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4091e7
push edx
push ecx
call fcn.00424e9e
add esp, 8
xor eax, eax
mov dword [ebp - 0x2a8], 0
mov dword [ebp - 0x2a4], 7
mov esi, 0x461e80
mov word [ebp - 0x2b8], ax
cmp dword [ebp - 0x54], 8
lea eax, [ebp - 0x68]
mov ecx, esi
cmovae eax, dword [ebp - 0x68]
cmp dword [esi + 0x14], 8
jb 0x4089c9
mov ecx, dword [esi]
push eax
push ecx
call fcn.0042f2bc
add esp, 8
test eax, eax
je 0x4089e4
add esi, 0x18
cmp esi, str._amiop:c:h:s:
jne 0x4089b4
jmp 0x408a06
mov eax, dword [ebp - 0x20]
lea ecx, [ebp - 0x4c]
push ecx
cmp dword [ebp - 0x1c], eax
je 0x4089fd
mov ecx, eax
call fcn.004028b0
add dword [ebp - 0x20], 0x18
jmp 0x408a06
push eax
lea ecx, [ebp - 0x24]
call fcn.00409330
mov byte [ebp - 4], 6
mov edx, dword [ebp - 0x54]
cmp edx, 8
jb 0x408a44
mov ecx, dword [ebp - 0x68]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x408a3a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4091e7
push edx
push ecx
call fcn.00424e9e
add esp, 8
mov byte [ebp - 4], 5
mov edx, dword [ebp - 0x38]
cmp edx, 8
jb 0x408a82
mov ecx, dword [ebp - 0x4c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x408a78
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4091e7
push edx
push ecx
call fcn.00424e9e
add esp, 8
lea ecx, [ebp - 0x18]
call fcn.0040a320
lea edx, [ebp - 0x34]
lea ecx, [ebp - 0x18]
call fcn.0040a310
test al, al
je 0x408aa1
mov ebx, dword [ebp - 0x18]
jmp 0x4088e0
mov esi, dword [ebp - 0x28]
mov edi, dword [ebp - 0x14]
or ebx, 0xffffffff
mov byte [ebp - 4], 0xb
test edi, edi
je 0x408ad4
mov eax, ebx
lock xadd dword [edi + 4], eax
jne 0x408ad1
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
mov eax, ebx
lock xadd dword [edi + 8], eax
jne 0x408ad1
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov esi, dword [ebp - 0x28]
mov byte [ebp - 4], 0xc
test esi, esi
je 0x408afa
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x408afa
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lock xadd dword [esi + 8], ebx
dec ebx
jne 0x408afa
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x24]
mov edi, dword [ebp - 0x20]
cmp ecx, edi
je 0x409151
push dword [ebp - 0x28]
mov esi, edi
mov eax, 0x2aaaaaab
sub esi, ecx
imul esi
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, edi
push eax
call fcn.00409730
mov ebx, dword [ebp - 0x24]
add esp, 8
mov eax, dword [ebp - 0x20]
mov esi, 0x200
mov dword [ebp - 0x294], ebx
mov dword [ebp - 0x28], eax
cmp ebx, eax
je 0x409075
nop dword [eax + eax]
cmp dword [ebx + 0x14], 8
mov eax, ebx
jb 0x408b5a
mov eax, dword [ebx]
push 0xffffffffffffffff
push 9
lea ecx, [ebp - 0x70]
push ecx
push eax
call fcn.0040e2ad
test eax, eax
jne 0x4091da
mov eax, dword [ebp - 0x68]
add eax, 0x1ff
cdq
and edx, 0x1ff
add eax, edx
sar eax, 9
mov dword [ebp - 0x30], eax
cmp eax, 0xc
jge 0x408cdc
cmp dword [ebx + 0x14], 8
mov ecx, ebx
mov edx, dword [ebx + 0x10]
jb 0x408b9d
mov ecx, dword [ebx]
lea edi, [ecx + edx*2]
mov edx, edi
mov esi, edi
call fcn.0040bce0
cmp eax, edi
je 0x408be5
nop dword [eax]
movzx ecx, word [eax]
cmp ecx, 0x5c
je 0x408bbd
cmp ecx, 0x2f
jne 0x408bc6
add eax, 2
cmp eax, edi
jne 0x408bb0
jmp 0x408be5
cmp eax, edi
je 0x408be5
nop word [eax + eax]
movzx ecx, word [esi - 2]
cmp ecx, 0x5c
je 0x408be5
cmp ecx, 0x2f
je 0x408be5
add esi, 0xfffffffe
cmp eax, esi
jne 0x408bd0
sub edi, esi
mov dword [ebp - 0x280], 0
sar edi, 1
lea ecx, [ebp - 0x290]
push edi
xor eax, eax
mov dword [ebp - 0x27c], 7
push esi
mov word [ebp - 0x290], ax
call fcn.004025c0
mov edi, dword [ebp - 0x27c]
lea ecx, [ebp - 0x290]
mov eax, dword [ebp - 0x280]
cmp edi, 8
cmovae ecx, dword [ebp - 0x290]
lea eax, [ecx + eax*2]
lea ecx, [ebp - 0x290]
mov esi, eax
cmovae ecx, dword [ebp - 0x290]
xor edx, edx
sub esi, ecx
inc esi
shr esi, 1
cmp ecx, eax
cmova esi, edx
test esi, esi
je 0x408c71
lea ebx, [edx + 0x5c]
cmp word [ecx], 0x2f
jne 0x408c5d
mov word [ecx], bx
inc edx
add ecx, 2
cmp edx, esi
jne 0x408c54
mov ebx, dword [ebp - 0x294]
mov edi, dword [ebp - 0x27c]
mov edx, dword [ebp - 0x30]
lea eax, [ebp - 0x290]
cmp edi, 8
push edx
cmovae eax, dword [ebp - 0x290]
push eax
push 0x45a170
call fcn.0040b710
mov edx, dword [ebp - 0x27c]
add esp, 0xc
cmp edx, 8
jb 0x409058
mov ecx, dword [ebp - 0x290]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x408ccd
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4091e7
push edx
push ecx
call fcn.00424e9e
add esp, 8
jmp 0x409058
cmp eax, 0xffff
jle 0x408e2c
cmp dword [ebx + 0x14], 8
mov ecx, ebx
mov eax, dword [ebx + 0x10]
jb 0x408cf4
mov ecx, dword [ebx]
lea edi, [ecx + eax*2]
mov edx, edi
mov esi, edi
call fcn.0040bce0
cmp eax, edi
je 0x408d35
movzx ecx, word [eax]
cmp ecx, 0x5c
je 0x408d11
cmp ecx, 0x2f
jne 0x408d1a
add eax, 2
cmp eax, edi
jne 0x408d04
jmp 0x408d35
cmp eax, edi
je 0x408d35
nop
movzx ecx, word [esi - 2]
cmp ecx, 0x5c
je 0x408d35
cmp ecx, 0x2f
je 0x408d35
add esi, 0xfffffffe
cmp eax, esi
jne 0x408d20
sub edi, esi
mov dword [ebp - 0x280], 0
sar edi, 1
lea ecx, [ebp - 0x290]
push edi
xor eax, eax
mov dword [ebp - 0x27c], 7
push esi
mov word [ebp - 0x290], ax
call fcn.004025c0
mov edi, dword [ebp - 0x27c]
lea ecx, [ebp - 0x290]
mov eax, dword [ebp - 0x280]
cmp edi, 8
cmovae ecx, dword [ebp - 0x290]
lea eax, [ecx + eax*2]
lea ecx, [ebp - 0x290]
mov esi, eax
cmovae ecx, dword [ebp - 0x290]
xor edx, edx
sub esi, ecx
inc esi
shr esi, 1
cmp ecx, eax
cmova esi, edx
test esi, esi
je 0x408dc1
lea ebx, [edx + 0x5c]
cmp word [ecx], 0x2f
jne 0x408dad
mov word [ecx], bx
inc edx
add ecx, 2
cmp edx, esi
jne 0x408da4
mov ebx, dword [ebp - 0x294]
mov edi, dword [ebp - 0x27c]
mov edx, dword [ebp - 0x30]
lea eax, [ebp - 0x290]
cmp edi, 8
push edx
cmovae eax, dword [ebp - 0x290]
push eax
push 0x45a210
call fcn.0040b710
mov edx, dword [ebp - 0x27c]
add esp, 0xc
cmp edx, 8
jb 0x409058
mov ecx, dword [ebp - 0x290]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x408e1d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4091e7
push edx
push ecx
call fcn.00424e9e
add esp, 8
jmp 0x409058
push 0x200
movzx esi, ax
lea eax, [ebp - 0x270]
push 0
push eax
call fcn.00427180
mov edi, dword [ebp - 0x29c]
add esp, 0xc
mov ecx, dword [ebp - 0x298]
mov word [ebp - 0x26e], si
mov dword [ebp - 0x26c], 0x4000000
mov ax, word [edi + 4]
add ax, 2
mov dword [ebp - 0x268], 0x19000200
mov word [ebp - 0x270], ax
mov eax, dword [edi + 4]
mov word [eax*4 + 0x463c76], cx
mov eax, dword [edi + 4]
shr ecx, 0x10
mov word [eax*4 + 0x463c78], cx
lea ecx, [ebp - 0x270]
call fcn.00404610
push dword [ebp - 0x2a0]
lea eax, [ebp - 0x270]
push 0x200
push 1
push eax
call fcn.0042a661
add esp, 0x10
cmp eax, 0x200
je 0x408eea
mov dword [edi + 0x14], 0xffffffff
mov eax, 0x461e1c
cmp dword [0x461e30], 8
cmovae eax, dword [0x461e1c]
push eax
push 0x45a134
call fcn.0040b710
add esp, 8
cmp dword [ebx + 0x14], 8
mov ecx, ebx
mov eax, dword [ebx + 0x10]
jb 0x408ef7
mov ecx, dword [ebx]
lea edi, [ecx + eax*2]
mov edx, edi
mov esi, edi
call fcn.0040bce0
cmp eax, edi
je 0x408f36
movzx ecx, word [eax]
cmp ecx, 0x5c
je 0x408f14
cmp ecx, 0x2f
jne 0x408f1d
add eax, 2
cmp eax, edi
jne 0x408f07
jmp 0x408f36
cmp eax, edi
je 0x408f36
movzx ecx, word [esi - 2]
cmp ecx, 0x5c
je 0x408f36
cmp ecx, 0x2f
je 0x408f36
add esi, 0xfffffffe
cmp eax, esi
jne 0x408f21
sub edi, esi
mov dword [ebp - 0x280], 0
sar edi, 1
lea ecx, [ebp - 0x290]
push edi
xor eax, eax
mov dword [ebp - 0x27c], 7
push esi
mov word [ebp - 0x290], ax
call fcn.004025c0
mov edi, dword [ebp - 0x27c]
lea ecx, [ebp - 0x290]
mov eax, dword [ebp - 0x280]
cmp edi, 8
cmovae ecx, dword [ebp - 0x290]
lea eax, [ecx + eax*2]
lea ecx, [ebp - 0x290]
mov esi, eax
cmovae ecx, dword [ebp - 0x290]
xor edx, edx
sub esi, ecx
inc esi
shr esi, 1
cmp ecx, eax
cmova esi, edx
test esi, esi
je 0x408fc2
lea ebx, [edx + 0x5c]
cmp word [ecx], 0x2f
jne 0x408fae
mov word [ecx], bx
inc edx
add ecx, 2
cmp edx, esi
jne 0x408fa5
mov ebx, dword [ebp - 0x294]
mov edi, dword [ebp - 0x27c]
mov esi, dword [ebp - 0x29c]
lea eax, [ebp - 0x290]
cmp edi, 8
cmovae eax, dword [ebp - 0x290]
push eax
push dword [esi + 4]
push 0x45a0a0
call fcn.0040b710
mov edx, dword [ebp - 0x27c]
add esp, 0xc
cmp edx, 8
jb 0x409029
mov ecx, dword [ebp - 0x290]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40901f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4091e7
push edx
push ecx
call fcn.00424e9e
add esp, 8
mov ecx, dword [ebp - 0x2a0]
mov edx, esi
push ebx
call fcn.004076d0
mov edx, dword [ebp - 0x30]
add esp, 4
mov byte [ebp - 0x271], al
mov eax, dword [ebp - 0x298]
inc eax
movzx ecx, dx
add eax, ecx
inc dword [esi + 4]
mov dword [ebp - 0x298], eax
add ebx, 0x18
mov dword [ebp - 0x294], ebx
cmp ebx, dword [ebp - 0x28]
jne 0x408b50
mov eax, dword [ebp - 0x20]
mov esi, 0x200
mov ebx, dword [ebp - 0x24]
push ecx
mov edx, eax
mov ecx, ebx
call fcn.00409640
mov ecx, dword [ebp - 0x24]
add esp, 4
mov bl, byte [ebp - 0x271]
mov edi, ecx
mov dword [ebp - 0x20], edi
test bl, bl
je 0x409157
mov ebx, dword [ebp - 0x29c]
mov edx, ebx
mov edi, dword [ebp - 0x2a0]
mov ecx, edi
call fcn.00407e70
mov eax, 2
mov word [0x463c70], ax
movzx eax, word [ebx + 0xa]
movzx ecx, word [ebx + 0xc]
imul ecx, eax
push 0
mov word [0x463c72], cx
mov al, byte [ebx + 0xa]
dec al
mov byte [0x463c75], al
mov al, byte [ebx + 0xc]
mov byte [0x463c74], al
mov eax, 0x400
cmp byte [ebx], 0
cmovne esi, eax
push esi
push edi
call fcn.0042a111
add esp, 0xc
mov ecx, 0x463c70
call fcn.00404610
push edi
push 0x200
push 1
push 0x463c70
call fcn.0042a661
add esp, 0x10
cmp eax, 0x200
je 0x40914b
mov dword [ebx + 0x14], 0xffffffff
mov eax, 0x461e1c
cmp dword [0x461e30], 8
cmovae eax, dword [0x461e1c]
push eax
push 0x45a134
call fcn.0040b710
mov edi, dword [ebp - 0x20]
add esp, 8
mov ecx, dword [ebp - 0x24]
xor bl, bl
jmp 0x409157
mov edi, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x24]
mov bl, byte [ebp - 0x271]
test ecx, ecx
je 0x4091a9
push ecx
mov edx, edi
call fcn.00409640
mov ecx, dword [ebp - 0x1c]
mov eax, 0x2aaaaaab
mov esi, dword [ebp - 0x24]
add esp, 4
sub ecx, esi
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax + eax*2]
mov eax, esi
shl ecx, 3
cmp ecx, 0x1000
jb 0x40919f
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4091e7
push ecx
push esi
call fcn.00424e9e
add esp, 8
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00424e8d
mov esp, ebp
pop ebp
ret
call fcn.0042a6b9
lea eax, [ebp - 0x4c]
mov ecx, str.status
push eax
call fcn.0040a280
push ebx
mov edx, eax
mov ecx, str.file_size
call fcn.0040a280
call fcn.00429c39
int3