Function at 0x59b5b0
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 [0x6b65bc]
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 0x59bbc6
push eax
call fcn.0059c170
mov ecx, dword [edi + 0x14]
add esp, 4
cmp ecx, ebp
je 0x59bbc6
mov eax, dword [edi + 8]
mov esi, dword [edi + 4]
test eax, 0x40000000
push ebx
mov dword [esp + 0x44], esi
je 0x59b7af
cmp ecx, 0xffffffff
jne 0x59b65a
push ebp
push ebp
push esi
call fcn.00567370
add esp, 0xc
test eax, eax
jne 0x59bb93
test byte [edi + 8], 1
je 0x59b644
push 1
jmp 0x59b645
push ebp
push esi
call fcn.0059a380
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
jmp 0x59bb93
mov ebx, dword [edi + 0xc]
push ebp
push ebx
push esi
mov dword [esp + 0x1c], ebx
call fcn.00567370
add esp, 0xc
cmp eax, ebx
jne 0x59bb93
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test byte [edi + 8], 1
je 0x59b748
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.00567250
mov edx, dword [esp + 0x2c]
push edx
call fcn.00567760
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x59bb93
mov eax, dword [esp + 0x20]
push eax
push eax
mov eax, dword [edi + 0x14]
push eax
push ebx
call fcn.005485b0
mov ebp, eax
push ebp
push ebx
push esi
call fcn.00567250
push ebx
mov dword [esp + 0x50], eax
call fcn.00567830
mov eax, dword [esp + 0x50]
add esp, 0x20
cmp ebp, eax
jne 0x59bb93
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 0x59b712
lea eax, [esp + 0x14]
push 0x16
push eax
push esi
call fcn.00567250
add esp, 0xc
cmp eax, 0x16
jne 0x59bb93
jmp 0x59bb9b
mov eax, dword [edi + 0x10]
mov dword [esp + 0x20], eax
mov ecx, dword [edi + 0x14]
push eax
push ecx
push esi
call fcn.00567250
mov ecx, dword [esp + 0x2c]
add esp, 0xc
cmp eax, ecx
jne 0x59bb93
lea ecx, [esp + 0x14]
mov dword [esp + 0x24], ebx
mov edx, dword [edi + 0x1c]
push ecx
mov ecx, dword [0x6b66f0]
mov dword [esp + 0x20], edx
mov edx, dword [edi + 0x1c]
sub eax, ecx
add eax, ebx
push edx
push eax
push esi
call fcn.0059b490
add esp, 0x10
test eax, eax
je 0x59bb93
mov dword [esp + 0x14], 0x6054b50
mov dword [esp + 0x18], ebp
mov word [esp + 0x28], bp
jmp 0x59b72a
test eax, 0x80000000
je 0x59bb9b
mov ebx, dword [edi + 0x18]
push ebp
push ebx
push esi
mov dword [esp + 0x1c], ebx
call fcn.00567370
add esp, 0xc
cmp eax, ebx
jne 0x59bb93
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x59bb93
mov ecx, dword [edi]
push ecx
call fcn.0059c540
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.0059ae10
mov ecx, dword [esp + 0x1c]
mov edx, dword [0x6b66f0]
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.00599900
cmp eax, 0xffffffff
je 0x59bb93
lea edx, [eax*8]
sub edx, eax
mov eax, dword [0x6b66f4]
lea eax, [eax + edx*8]
mov dword [esp + 0x30], eax
mov dword [eax + 0x20], 0x40000000
mov al, byte [edi + 8]
test al, 1
je 0x59ba42
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x14], 0x605444f
lea edx, [ecx + ecx]
push edx
call fcn.00567760
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
je 0x59bb93
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.0059ab90
add esp, 0x10
cmp eax, 0xffffffff
je 0x59ba30
mov al, byte [esp + 0x78]
test al, al
je 0x59b974
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x2c]
cmp eax, edx
jge 0x59ba30
mov edx, dword [0x6b66e8]
lea edi, [esp + 0x78]
mov esi, dword [0x6b66f0]
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.0059ac40
add esp, 8
cmp eax, 0xffffffff
jne 0x59b8ca
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.00567250
add esp, 0xc
cmp eax, 4
jne 0x59ba30
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.005485b0
mov ebp, eax
mov eax, dword [esp + 0x4c]
push ebp
push eax
push esi
mov dword [esp + 0x3c], ebx
call fcn.00567250
add esp, 0x1c
cmp eax, ebp
jne 0x59ba30
mov ecx, dword [esp + 0x10]
push ecx
call fcn.00567830
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 0x59b9ff
lea eax, [esp + 0x14]
push 0x16
push eax
push esi
call fcn.00567250
add esp, 0xc
cmp eax, 0x16
je 0x59bb9b
mov ecx, dword [esp + 0x10]
push ecx
call fcn.00567830
add esp, 4
jmp 0x59bb93
mov eax, dword [esp + 0x180]
lea edx, [esp + 0x78]
push edx
push 0x80
push 0
push eax
call fcn.0059ab90
add esp, 0x10
cmp eax, 0xffffffff
je 0x59bb93
mov al, byte [esp + 0x78]
test al, al
je 0x59bb1f
cmp ebp, dword [esp + 0x40]
jge 0x59bb93
mov edx, dword [0x6b66e8]
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 [0x6b66f0]
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.00567250
add esp, 0xc
cmp eax, 0x2e
jne 0x59bb8f
mov ax, word [esp + 0x64]
lea ecx, [esp + 0x78]
movsx edi, ax
movsx eax, ax
push eax
push ecx
push esi
call fcn.00567250
add esp, 0xc
cmp eax, edi
jne 0x59bb8f
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.0059ac40
add esp, 8
cmp eax, 0xffffffff
jne 0x59ba67
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 [0x6b66f0]
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.0059b490
add esp, 0x10
test eax, eax
je 0x59bb93
lea eax, [esp + 0x14]
push 0x16
push eax
push esi
call fcn.00567250
add esp, 0xc
cmp eax, 0x16
je 0x59bb9b
jmp 0x59bb93
mov edi, dword [esp + 0x34]
mov dword [esp + 0x38], 0
mov eax, dword [edi + 0x14]
pop ebx
cmp eax, 0xffffffff
je 0x59bbb1
test eax, eax
je 0x59bbb1
push eax
call fcn.00567830
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