Function at 0x59af00
Capabilities:
Clear file content
Encode data using xor
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x16c
mov eax, dword [esp + 0x170]
mov edx, dword [0x6a9d1c]
push ebp
push esi
lea ecx, [eax*8]
push edi
sub ecx, eax
or eax, 0x4f440000
mov dword [esp + 0x17c], eax
mov eax, dword [edx + ecx*8]
lea edi, [edx + ecx*8]
xor ebp, ebp
mov esi, 1
cmp eax, ebp
mov dword [esp + 0x34], esi
mov dword [esp + 0x30], edi
je 0x59b516
push eax
call fcn.0059bb20
mov ecx, dword [edi + 0x14]
add esp, 4
cmp ecx, ebp
je 0x59b516
mov eax, dword [edi + 8]
mov esi, dword [edi + 4]
test eax, 0x40000000
push ebx
mov dword [esp + 0x44], esi
je 0x59b0ff
cmp ecx, 0xffffffff
jne 0x59afaa
push ebp
push ebp
push esi
call fcn.00566d20
add esp, 0xc
test eax, eax
jne 0x59b4e3
test byte [edi + 8], 1
je 0x59af94
push 1
jmp 0x59af95
push ebp
push esi
call fcn.00599cd0
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
jmp 0x59b4e3
mov ebx, dword [edi + 0xc]
push ebp
push ebx
push esi
mov dword [esp + 0x1c], ebx
call fcn.00566d20
add esp, 0xc
cmp eax, ebx
jne 0x59b4e3
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test byte [edi + 8], 1
je 0x59b098
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], 0x605444f
mov eax, dword [edi + 0x10]
push 4
push ecx
push esi
mov dword [esp + 0x2c], eax
call fcn.00566c00
mov edx, dword [esp + 0x2c]
push edx
call fcn.00567110
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x59b4e3
mov eax, dword [esp + 0x20]
push eax
push eax
mov eax, dword [edi + 0x14]
push eax
push ebx
call fcn.005481b0
mov ebp, eax
push ebp
push ebx
push esi
call fcn.00566c00
push ebx
mov dword [esp + 0x50], eax
call fcn.005671e0
mov eax, dword [esp + 0x50]
add esp, 0x20
cmp ebp, eax
jne 0x59b4e3
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x14], 0x605444f
mov dword [esp + 0x24], ecx
mov dword [esp + 0x18], ebp
mov word [esp + 0x28], 0
mov edx, dword [edi + 0x1c]
mov dword [esp + 0x1c], edx
mov ecx, 4
mov al, cl
mov dl, 3
imul dl
mov bl, byte [esp + ecx + 0x14]
sub al, 0x4d
xor bl, al
mov byte [esp + ecx + 0x14], bl
inc ecx
cmp ecx, 0x16
jb 0x59b062
lea eax, [esp + 0x14]
push 0x16
push eax
push esi
call fcn.00566c00
add esp, 0xc
cmp eax, 0x16
jne 0x59b4e3
jmp 0x59b4eb
mov eax, dword [edi + 0x10]
mov dword [esp + 0x20], eax
mov ecx, dword [edi + 0x14]
push eax
push ecx
push esi
call fcn.00566c00
mov ecx, dword [esp + 0x2c]
add esp, 0xc
cmp eax, ecx
jne 0x59b4e3
lea ecx, [esp + 0x14]
mov dword [esp + 0x24], ebx
mov edx, dword [edi + 0x1c]
push ecx
mov ecx, dword [0x6a9e50]
mov dword [esp + 0x20], edx
mov edx, dword [edi + 0x1c]
sub eax, ecx
add eax, ebx
push edx
push eax
push esi
call fcn.0059ade0
add esp, 0x10
test eax, eax
je 0x59b4e3
mov dword [esp + 0x14], 0x6054b50
mov dword [esp + 0x18], ebp
mov word [esp + 0x28], bp
jmp 0x59b07a
test eax, 0x80000000
je 0x59b4eb
mov ebx, dword [edi + 0x18]
push ebp
push ebx
push esi
mov dword [esp + 0x1c], ebx
call fcn.00566d20
add esp, 0xc
cmp eax, ebx
jne 0x59b4e3
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x59b4e3
mov ecx, dword [edi]
push ecx
call fcn.0059bef0
mov ecx, eax
push edi
shl eax, 4
add eax, ecx
mov dword [esp + 0x48], ecx
mov dword [esp + 0x34], ebp
xor ebx, ebx
lea edx, [eax + eax*8]
lea eax, [esp + 0x50]
shl edx, 1
push eax
mov dword [esp + 0x2c], edx
call fcn.0059a760
mov ecx, dword [esp + 0x1c]
mov edx, dword [0x6a9e50]
sub ecx, edx
xor eax, eax
add esp, 0xc
mov dword [esp + 0x14], 0x6054b50
mov dword [esp + 0x24], ecx
mov dword [esp + 0x18], eax
mov word [esp + 0x28], ax
mov word [esp + 0x1c], ax
mov word [esp + 0x1e], ax
call fcn.00599250
cmp eax, 0xffffffff
je 0x59b4e3
lea edx, [eax*8]
sub edx, eax
mov eax, dword [0x6a9e54]
lea eax, [eax + edx*8]
mov dword [esp + 0x30], eax
mov dword [eax + 0x20], 0x40000000
mov al, byte [edi + 8]
test al, 1
je 0x59b392
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x14], 0x605444f
lea edx, [ecx + ecx]
push edx
call fcn.00567110
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
je 0x59b4e3
mov ecx, dword [esp + 0x20]
mov ebp, eax
lea edx, [eax + ecx]
mov ecx, dword [esp + 0x180]
lea eax, [esp + 0x78]
mov dword [esp + 0x3c], edx
push eax
push 0x80
push ebx
push ecx
call fcn.0059a4e0
add esp, 0x10
cmp eax, 0xffffffff
je 0x59b380
mov al, byte [esp + 0x78]
test al, al
je 0x59b2c4
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x2c]
cmp eax, edx
jge 0x59b380
mov edx, dword [0x6a9e48]
lea edi, [esp + 0x78]
mov esi, dword [0x6a9e50]
mov eax, dword [edx + 0x18]
mov dword [esp + 0x54], eax
mov ecx, dword [edx]
mov dword [esp + 0x58], ecx
mov eax, dword [edx + 8]
mov dword [esp + 0x5c], eax
mov ecx, dword [edx + 0xc]
mov dword [esp + 0x60], ecx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ebp
mov word [esp + 0x64], cx
mov eax, dword [edx + 0x10]
sub eax, esi
lea esi, [esp + 0x48]
mov dword [esp + 0x72], eax
mov cx, word [edx + 4]
mov word [esp + 0x52], cx
mov ecx, 0xb
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsx ecx, word [esp + 0x64]
add ebp, 0x2e
mov edx, ecx
lea esi, [esp + 0x78]
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
movsx eax, word [esp + 0x64]
mov esi, dword [esp + 0x44]
mov edi, dword [esp + 0x34]
add ebp, eax
lea ebx, [ebx + eax + 0x2e]
inc dword [esp + 0x2c]
mov ecx, dword [esp + 0x180]
lea eax, [esp + 0x78]
push eax
push ecx
call fcn.0059a590
add esp, 8
cmp eax, 0xffffffff
jne 0x59b21a
mov eax, dword [esp + 0x30]
lea edx, [esp + 0x14]
push 4
xor ecx, ecx
push edx
push esi
mov dword [eax + 8], ecx
mov dword [eax + 0x20], ecx
call fcn.00566c00
add esp, 0xc
cmp eax, 4
jne 0x59b380
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x3c]
push eax
push ebx
push ecx
push edx
call fcn.005481b0
mov ebp, eax
mov eax, dword [esp + 0x4c]
push ebp
push eax
push esi
mov dword [esp + 0x3c], ebx
call fcn.00566c00
add esp, 0x1c
cmp eax, ebp
jne 0x59b380
mov ecx, dword [esp + 0x10]
push ecx
call fcn.005671e0
mov edx, dword [esp + 0x30]
add esp, 4
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], edx
mov ecx, 4
mov al, cl
mov dl, 3
imul dl
mov bl, byte [esp + ecx + 0x14]
sub al, 0x4d
xor bl, al
mov byte [esp + ecx + 0x14], bl
inc ecx
cmp ecx, 0x16
jb 0x59b34f
lea eax, [esp + 0x14]
push 0x16
push eax
push esi
call fcn.00566c00
add esp, 0xc
cmp eax, 0x16
je 0x59b4eb
mov ecx, dword [esp + 0x10]
push ecx
call fcn.005671e0
add esp, 4
jmp 0x59b4e3
mov eax, dword [esp + 0x180]
lea edx, [esp + 0x78]
push edx
push 0x80
push 0
push eax
call fcn.0059a4e0
add esp, 0x10
cmp eax, 0xffffffff
je 0x59b4e3
mov al, byte [esp + 0x78]
test al, al
je 0x59b46f
cmp ebp, dword [esp + 0x40]
jge 0x59b4e3
mov edx, dword [0x6a9e48]
lea edi, [esp + 0x78]
push 0x2e
mov ecx, dword [edx + 0x18]
mov dword [esp + 0x58], ecx
mov eax, dword [edx]
mov dword [esp + 0x5c], eax
mov ecx, dword [edx + 8]
mov dword [esp + 0x60], ecx
mov eax, dword [edx + 0xc]
mov dword [esp + 0x64], eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
mov edi, dword [0x6a9e50]
dec ecx
mov word [esp + 0x68], cx
mov eax, dword [edx + 0x10]
movsx ecx, cx
sub eax, ecx
sub eax, edi
sub eax, 0x1e
mov dword [esp + 0x76], eax
mov cx, word [edx + 4]
lea edx, [esp + 0x4c]
mov word [esp + 0x56], cx
push edx
push esi
call fcn.00566c00
add esp, 0xc
cmp eax, 0x2e
jne 0x59b4df
mov ax, word [esp + 0x64]
lea ecx, [esp + 0x78]
movsx edi, ax
movsx eax, ax
push eax
push ecx
push esi
call fcn.00566c00
add esp, 0xc
cmp eax, edi
jne 0x59b4df
mov eax, dword [esp + 0x2c]
lea ebx, [ebx + edi + 0x2e]
mov edi, dword [esp + 0x34]
inc eax
mov dword [esp + 0x2c], eax
mov ebp, eax
mov eax, dword [esp + 0x180]
lea edx, [esp + 0x78]
push edx
push eax
call fcn.0059a590
add esp, 8
cmp eax, 0xffffffff
jne 0x59b3b7
mov eax, dword [esp + 0x30]
xor ecx, ecx
lea edx, [esp + 0x14]
mov dword [eax + 8], ecx
mov dword [eax + 0x20], ecx
mov ecx, dword [esp + 0x10]
mov eax, dword [0x6a9e50]
mov dword [esp + 0x20], ebx
add ebx, ecx
push edx
sub ebx, eax
push ebp
push ebx
push esi
mov word [esp + 0x2c], bp
mov word [esp + 0x2e], bp
call fcn.0059ade0
add esp, 0x10
test eax, eax
je 0x59b4e3
lea eax, [esp + 0x14]
push 0x16
push eax
push esi
call fcn.00566c00
add esp, 0xc
cmp eax, 0x16
je 0x59b4eb
jmp 0x59b4e3
mov edi, dword [esp + 0x34]
mov dword [esp + 0x38], 0
mov eax, dword [edi + 0x14]
pop ebx
cmp eax, 0xffffffff
je 0x59b501
test eax, eax
je 0x59b501
push eax
call fcn.005671e0
add esp, 4
mov eax, dword [esp + 0x34]
mov dword [edi + 0x14], 0
pop edi
pop esi
pop ebp
add esp, 0x16c
ret
mov eax, esi
pop edi
pop esi
pop ebp
add esp, 0x16c
ret