Function at 0x4af470
Capabilities:
Delete file

Disassembly:
mov eax, dword [0x6b4220]
sub esp, 0x24
test eax, eax
push ebx
push ebp
push esi
push edi
je 0x4afa0a
cmp dword [eax + 0x24], 1
jb 0x4afa0a
xor ebx, ebx
call fcn.004af120
test eax, eax
je 0x4afa0a
mov esi, dword [0x6b4258]
xor ecx, ecx
cmp dword [0x6b4250], ecx
jle 0x4af534
mov ebp, dword [0x6b4250]
add ebp, 0xffffffff
lea ebx, [ebx]
cmp ecx, ebp
jge 0x4af529
mov eax, dword [0x6b425c]
mov eax, dword [eax + ecx*4]
lea edx, [eax + eax*4]
mov eax, dword [0x6b425c]
mov eax, dword [eax + ecx*4 + 4]
movzx edi, word [esi + edx*4 + 0xc]
lea eax, [eax + eax*4]
mov eax, dword [esi + eax*4 + 8]
sub eax, dword [esi + edx*4 + 8]
lea edx, [esi + edx*4]
cmp edi, eax
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], eax
jge 0x4af526
fild dword [esp + 0x24]
fnstcw word [esp + 0x10]
fidiv dword [esp + 0x20]
movzx eax, word [esp + 0x10]
or eax, 0xc00
mov dword [esp + 0x24], eax
fldcw word [esp + 0x24]
fistp qword [esp + 0x28]
mov edx, dword [esp + 0x28]
lea ebx, [ebx + edx*2]
fldcw word [esp + 0x10]
jmp 0x4af529
add ebx, 2
add ecx, 1
cmp ecx, dword [0x6b4250]
jl 0x4af4c0
cmp dword [0x6b424c], 0
fld qword [0x655790]
fld qword [0x655768]
mov dword [esp + 0x10], 0
jbe 0x4af639
add esi, 8
mov edi, dword [esi - 4]
cmp edi, dword [0x6b4248]
je 0x4af59c
xor ecx, ecx
cmp dword [0x6b4250], ecx
jle 0x4af59c
mov eax, dword [0x6b425c]
mov edx, dword [esp + 0x10]
cmp edx, dword [eax + ecx*4]
jne 0x4af591
movzx ebp, word [esi + 8]
mov eax, edi
sub eax, dword [0x6b4248]
lea eax, [eax + eax*4]
add eax, eax
cdq
idiv ebp
add ebx, eax
add ecx, 1
cmp ecx, dword [0x6b4250]
jl 0x4af56d
mov eax, dword [0x6b424c]
add eax, 0xffffffff
cmp dword [esp + 0x10], eax
jae 0x4af617
movzx edx, word [esi + 4]
movzx ecx, word [esi + 0x18]
mov eax, dword [esi]
sub eax, dword [esi + 0x14]
cmp edx, ecx
mov dword [esp + 0x1c], edx
jl 0x4af5c3
mov dword [esp + 0x1c], ecx
fild dword [esp + 0x1c]
cdq
mov ebp, eax
xor ebp, edx
fmul st(2)
sub ebp, edx
fadd st(1)
call fcn.005a3c30
cmp ebp, eax
jg 0x4af60d
movzx ecx, word [esi + 0xa]
mov eax, dword [esi + 0x10]
sub eax, ecx
sub eax, edi
test eax, eax
jle 0x4af605
movzx ecx, word [esi + 8]
lea eax, [eax + eax*4]
add eax, eax
cmp eax, ecx
jl 0x4af605
cdq
idiv ecx
movzx edx, word [esi + 6]
add edx, ebx
lea ebx, [edx + eax]
jmp 0x4af61f
movzx eax, word [esi + 6]
add ebx, eax
jmp 0x4af61f
movzx ecx, word [esi + 6]
lea ebx, [ebx + ecx + 2]
jmp 0x4af61f
movzx edx, word [esi + 6]
lea ebx, [ebx + edx + 2]
mov eax, dword [esp + 0x10]
add eax, 1
add esi, 0x14
cmp eax, dword [0x6b424c]
mov dword [esp + 0x10], eax
jb 0x4af558
lea eax, [ebx + ebx + 2]
fstp st(1)
push eax
fstp st(0)
push 2
call dword [sym.imp.kernel32.dll_GlobalAlloc]
mov ebx, eax
push ebx
mov dword [esp + 0x1c], ebx
call dword [sym.imp.kernel32.dll_GlobalLock]
cmp dword [0x6b424c], 0
mov ebp, eax
mov dword [esp + 0x1c], ebp
mov esi, ebp
mov word [ebp], 0
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], 0
jbe 0x4af8cf
xor ebx, ebx
jmp 0x4af690
mov ecx, dword [0x6b4258]
mov edx, dword [ebx + ecx + 4]
cmp edx, dword [0x6b4248]
lea ebp, [ebx + ecx + 4]
je 0x4af71d
xor eax, eax
cmp dword [0x6b4250], eax
mov dword [esp + 0x20], eax
jle 0x4af71d
jmp 0x4af6c0
mov edx, dword [0x6b425c]
mov edi, dword [esp + 0x10]
cmp edi, dword [edx + eax*4]
jne 0x4af70e
mov eax, dword [ebp]
sub eax, dword [0x6b4248]
movzx edi, word [ebx + ecx + 0x10]
lea eax, [eax + eax*4]
add eax, eax
cdq
idiv edi
mov edx, eax
xor eax, eax
test edx, edx
jle 0x4af707
mov ecx, edx
shr ecx, 1
mov eax, 0x200020
mov edi, esi
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov ecx, dword [0x6b4258]
mov eax, edx
lea esi, [esi + eax*2]
mov eax, dword [esp + 0x20]
add eax, 1
cmp eax, dword [0x6b4250]
mov dword [esp + 0x20], eax
jl 0x4af6c0
movzx edi, word [ebx + ecx + 0xe]
mov eax, dword [esp + 0x10]
mov dword [esp + 0x24], edi
call fcn.004af070
mov ebp, eax
test ebp, ebp
je 0x4af9ba
add edi, edi
push edi
lea eax, [ebp + 0x6c]
push eax
push esi
call fcn.005a34c0
mov eax, dword [0x6b4220]
add esp, 0xc
cmp word [eax + 0x34], 0
je 0x4af77f
movzx ecx, word [eax + 0x36]
cmp cx, 0xffff
je 0x4af77f
mov edx, dword [eax + 0x38]
lea eax, [edx + eax + 0x158]
cmp eax, ebp
jne 0x4af77f
mov eax, esi
sub eax, dword [esp + 0x1c]
movzx ecx, cx
sar eax, 1
add eax, ecx
mov dword [esp + 0x14], eax
mov edx, dword [0x6b424c]
mov ecx, dword [0x6b4258]
add edx, 0xffffffff
cmp dword [esp + 0x10], edx
jae 0x4af8a5
mov edx, dword [ebx + ecx + 0x1c]
mov eax, dword [ebx + ecx + 8]
sub eax, edx
movzx edx, word [ebx + ecx + 0x20]
movzx ecx, word [ebx + ecx + 0xc]
cmp ecx, edx
mov dword [esp + 0x20], ecx
jl 0x4af7b8
mov dword [esp + 0x20], edx
fild dword [esp + 0x20]
cdq
mov ebp, eax
xor ebp, edx
fmul qword [0x655790]
sub ebp, edx
fadd qword [0x655768]
call fcn.005a3c30
cmp ebp, eax
jg 0x4af831
mov ecx, dword [0x6b4258]
movzx edx, word [ebx + ecx + 0x12]
mov eax, dword [ebx + ecx + 0x18]
sub eax, edx
sub eax, dword [ebx + ecx + 4]
test eax, eax
jle 0x4af8ab
movzx ecx, word [ebx + ecx + 0x10]
lea eax, [eax + eax*4]
add eax, eax
cmp eax, ecx
jl 0x4af8ab
cdq
idiv ecx
mov edx, eax
xor eax, eax
test edx, edx
jle 0x4af826
add edi, esi
mov ecx, edx
shr ecx, 1
mov eax, 0x200020
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov eax, edx
mov ecx, dword [esp + 0x24]
add eax, ecx
lea esi, [esi + eax*2]
jmp 0x4af8ad
mov eax, dword [0x6b4258]
movzx ecx, word [ebx + eax + 0xc]
mov edx, ecx
mov ecx, dword [ebx + eax + 0x1c]
sub ecx, dword [ebx + eax + 8]
mov dword [esp + 0x28], edx
cmp edx, ecx
mov dword [esp + 0x20], ecx
jge 0x4af887
fild dword [esp + 0x20]
add esi, edi
fidiv dword [esp + 0x28]
call fcn.005a3c30
xor edx, edx
cmp eax, edx
jle 0x4af8ad
mov ecx, 0xa
jmp 0x4af870
mov word [esi], 0xd
mov word [esi + 2], cx
mov word [esi + 4], dx
add esi, 4
sub eax, 1
jne 0x4af870
jmp 0x4af8ad
mov eax, dword [esp + 0x24]
mov word [edi + esi], 0xd
mov word [edi + esi + 2], 0xa
mov word [esi + eax*2 + 4], 0
lea esi, [esi + eax*2 + 4]
jmp 0x4af8ad
mov word [edi + esi], 0
add esi, edi
mov eax, dword [esp + 0x10]
add eax, 1
add ebx, 0x14
cmp eax, dword [0x6b424c]
mov dword [esp + 0x10], eax
jb 0x4af690
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x1c]
mov eax, dword [0x6b425c]
push eax
call fcn.005a01b3
mov ecx, dword [0x6b4220]
sub esi, ebp
sar esi, 1
add esp, 4
test dword [ecx + 0x48], 0x400
mov dword [0x6b425c], 0
mov dword [esp + 0x24], esi
je 0x4afa14
cmp dword [esp + 0x14], 0
jl 0x4afa14
mov eax, dword [esp + 0x14]
test eax, eax
mov edi, eax
mov ebx, eax
je 0x4af93e
lea esi, [ebp + eax*2 - 2]
lea ecx, [ecx]
movzx edx, word [esi]
push edx
call fcn.005a7cd8
add esp, 4
test eax, eax
je 0x4af93a
sub ebx, 1
sub esi, 2
test ebx, ebx
jne 0x4af920
mov eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x24]
jge 0x4af969
mov esi, dword [esp + 0x24]
jmp 0x4af950
movzx eax, word [ebp + edi*2]
push eax
call fcn.005a7cd8
add esp, 4
test eax, eax
je 0x4af969
add edi, 1
cmp edi, esi
jl 0x4af950
sub edi, ebx
lea esi, [edi + edi]
lea ecx, [esi + 2]
push ecx
push 2
call dword [sym.imp.kernel32.dll_GlobalAlloc]
mov edi, eax
push edi
call dword [sym.imp.kernel32.dll_GlobalLock]
mov edx, dword [esp + 0x1c]
mov ebp, eax
push esi
lea eax, [edx + ebx*2]
push eax
push ebp
call fcn.005a34c0
mov word [esi + ebp], 0
mov esi, dword [esp + 0x24]
add esp, 0xc
push esi
call dword [sym.imp.kernel32.dll_GlobalUnlock]
push esi
call dword [sym.imp.kernel32.dll_GlobalFree]
mov dword [esp + 0x18], edi
mov ebx, edi
jmp 0x4afa94
mov edx, dword [0x6b4254]
push edx
call fcn.0059f7da
mov eax, dword [0x6b4220]
add esp, 4
add eax, 0x50
xor esi, esi
push eax
mov dword [0x6b4254], esi
call dword [sym.imp.kernel32.dll_DeleteFileA]
mov ecx, dword [0x6b425c]
push ecx
call fcn.005a01b3
mov edx, dword [0x6b4258]
add esp, 4
push edx
mov dword [0x6b425c], esi
call fcn.005a01b3
add esp, 4
mov dword [0x6b4258], esi
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
movzx eax, word [ebp]
test ax, ax
mov edi, ebp
je 0x4afa64
movzx edx, ax
lea ecx, [ebp + 4]
cmp dx, 0x20
ja 0x4afa49
cmp dx, 0xd
jne 0x4afa3a
cmp word [ecx - 2], 0xa
jne 0x4afa3a
mov edi, ecx
movzx eax, word [ecx - 2]
add ecx, 2
test ax, ax
movzx edx, ax
jne 0x4afa25
cmp edi, ebp
jbe 0x4afa64
mov ecx, edi
sub ecx, ebp
sar ecx, 1
sub esi, ecx
lea edx, [esi + esi + 2]
push edx
push edi
push ebp
call fcn.005a1460
add esp, 0xc
lea eax, [ebp + esi*2]
cmp eax, ebp
jb 0x4afa94
mov edx, 0xa
movzx ecx, word [eax]
cmp cx, 0xd
jne 0x4afa87
cmp word [eax + 2], dx
jne 0x4afa87
mov word [eax], 0
jmp 0x4afa8d
cmp cx, 0x20
ja 0x4afa94
sub eax, 2
cmp eax, ebp
jae 0x4afa71
mov eax, dword [0x6b4254]
test eax, eax
je 0x4afaa6
push eax
call fcn.0059f7da
add esp, 4
mov eax, dword [0x6b4258]
xor esi, esi
push eax
mov dword [0x6b4254], esi
call fcn.005a01b3
add esp, 4
push ebx
mov dword [0x6b4258], esi
call dword [sym.imp.kernel32.dll_GlobalUnlock]
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x24
ret