Function at 0x509a10
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f9f54
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x64
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x10], esp
lea ecx, [esi + 0x2a4]
mov dword [ebp - 0x28], ecx
call fcn.004dbb53
mov eax, dword [esi + 0x2a8]
xor ebx, ebx
cmp eax, ebx
mov dword [ebp - 0x20], 0xffffffff
je 0x50a1ef
cmp eax, 0xb
je 0x50a1ef
cmp eax, 0xffffffff
mov dword [ebp - 0x24], ebx
je 0x509a75
xor eax, eax
mov ax, word [esi + 0x2a8]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x18]
push eax
call fcn.004dbc3f
mov eax, dword [ebp + 0xc]
mov dword [ebp - 4], ebx
cmp eax, ebx
je 0x509a94
push eax
lea ecx, [ebp - 0x18]
call fcn.004dbd62
cmp dword [esi + 0x28c], ebx
jle 0x509af4
xor edi, edi
mov ecx, dword [esi + 0x288]
lea eax, [edi + ecx]
mov cl, byte [edi + ecx + 0x10]
test cl, 3
jne 0x509ae1
mov eax, dword [eax + 0xc]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x509ae1
mov edx, dword [ebp - 0x18]
push eax
push edx
mov ecx, esi
call fcn.0050a230
test eax, eax
je 0x509ae1
mov eax, dword [esi + 0x288]
mov eax, dword [edi + eax + 4]
push eax
call fcn.0048bf80
add esp, 4
test eax, eax
jne 0x509af1
mov eax, dword [esi + 0x28c]
inc ebx
add edi, 0x14
cmp ebx, eax
jl 0x509a9e
jmp 0x509af4
mov dword [ebp - 0x20], ebx
mov eax, dword [ebp - 0x20]
mov edi, 1
test eax, eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x1c], edi
jge 0x509bd6
test eax, eax
jne 0x509bd6
mov ecx, dword [ebp - 0x18]
push eax
lea edx, [esi + 0x264]
push ecx
push edx
mov ecx, esi
mov dword [ebp - 0x70], 2
mov dword [ebp - 0x6c], 3
mov dword [ebp - 0x68], 4
mov dword [ebp - 0x64], 5
mov dword [ebp - 0x60], 6
mov dword [ebp - 0x5c], 7
mov dword [ebp - 0x58], 8
mov dword [ebp - 0x54], 9
mov dword [ebp - 0x50], 0xa
mov dword [ebp - 0x4c], 0xb
mov dword [ebp - 0x48], eax
call fcn.0050b9a0
test eax, eax
jl 0x509b83
cmp eax, 0xb
jae 0x509b83
mov edi, dword [ebp + eax*4 - 0x70]
mov dword [ebp - 0x1c], edi
jmp 0x509c0e
mov eax, dword [ebp + 8]
push eax
call fcn.005098f0
mov edi, eax
add esp, 4
test edi, edi
mov dword [ebp - 0x1c], edi
je 0x50a1e0
xor eax, eax
lea ecx, [ebp - 0x70]
cmp dword [ecx], edi
jne 0x509bad
cmp eax, dword [esi + 0x26c]
jl 0x509bb8
inc eax
add ecx, 4
cmp eax, 0xb
jb 0x509ba1
jmp 0x509c0e
mov edx, dword [esi + 0x268]
lea ecx, [eax + eax*4]
mov eax, dword [edx + ecx*4 + 0x10]
test al, 3
jne 0x50a1e0
test al, 0x80
jne 0x509c0e
jmp 0x50a1e0
cmp eax, 1
jle 0x509be2
mov edi, eax
mov dword [ebp - 0x1c], edi
jmp 0x509c0e
jne 0x509c0e
mov eax, dword [esi + 0x2a8]
mov edi, 1
shr eax, 0x10
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x20], eax
js 0x509c02
cmp eax, dword [esi + 0x28c]
jl 0x509c0e
xor edi, edi
mov dword [ebp - 0x20], 0xffffffff
mov dword [ebp - 0x1c], edi
mov eax, dword [0x5748d0]
mov dword [ebp - 0x14], eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 1
push ecx
push 0x539d38
call fcn.0048bfc0
add edi, 0xfffffffe
add esp, 8
cmp edi, 8
ja case.default.0x509c37
jmp dword [edi*4 + 0x50a204]
push 0x1c
call fcn.004db904
add esp, 4
mov dword [ebp + 8], eax
test eax, eax
mov byte [ebp - 4], 2
je 0x509c5c
mov ecx, eax
call fcn.004377d0
jmp 0x509c5e
xor eax, eax
mov edx, dword [ebp + 0x14]
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
mov dword [edx], eax
call fcn.004dbbcb
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0xffffffff
call fcn.004dbbcb
mov eax, 5
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
push 0x14
call fcn.004db904
mov esi, eax
add esp, 4
mov dword [ebp + 8], esi
test esi, esi
mov byte [ebp - 4], 3
je 0x509cbc
mov ecx, esi
call fcn.00437710
mov dword [esi], 0x50f444
jmp 0x509cbe
xor esi, esi
mov eax, dword [ebp + 0x14]
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
mov dword [eax], esi
call fcn.004dbbcb
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0xffffffff
call fcn.004dbbcb
mov eax, 0xa
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
push 0x24
call fcn.004db904
add esp, 4
mov dword [ebp + 8], eax
test eax, eax
mov byte [ebp - 4], 4
je 0x509d14
mov ecx, eax
call fcn.00438160
jmp 0x509d16
xor eax, eax
mov ecx, dword [ebp + 0x14]
mov byte [ebp - 4], 0
mov dword [ecx], eax
lea ecx, [ebp - 0x14]
call fcn.004dbbcb
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0xffffffff
call fcn.004dbbcb
mov eax, 6
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp + 8]
push edx
push eax
call fcn.004666b0
add esp, 8
test eax, eax
jne 0x50a147
jmp 0x50a1d4
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp + 8]
push ecx
push edx
call fcn.00438710
add esp, 8
test eax, eax
jne 0x50a147
jmp 0x50a1d4
push 0x24
call fcn.004db904
add esp, 4
mov dword [ebp + 8], eax
test eax, eax
mov byte [ebp - 4], 5
je 0x509da6
mov ecx, eax
call fcn.004381d0
jmp 0x509da8
xor eax, eax
mov ecx, dword [ebp + 0x14]
mov byte [ebp - 4], 0
mov dword [ecx], eax
lea ecx, [ebp - 0x14]
call fcn.004dbbcb
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0xffffffff
call fcn.004dbbcb
mov eax, 7
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
push 0x10
call fcn.004db904
add esp, 4
test eax, eax
je 0x509e07
mov ecx, eax
xor edx, edx
or ebx, 0xffffffff
mov esi, eax
mov dword [ecx], edx
mov dword [ecx + 4], edx
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], edx
mov dword [eax + 0xc], ebx
jmp 0x509e0c
xor esi, esi
or ebx, 0xffffffff
mov edx, dword [ebp + 8]
push esi
push edx
mov dword [esi + 0xc], ebx
mov byte [ebp - 4], 6
call fcn.004a9b34
mov edi, eax
test edi, edi
jne 0x509e9e
mov eax, dword [esi + 0xc]
test eax, eax
jle 0x509e81
mov eax, dword [ebp - 0x14]
push esi
push eax
call fcn.00412830
add esp, 8
test eax, eax
jne 0x509e40
mov edi, 1
push esi
call fcn.004a9970
test edi, edi
jne 0x509e9e
mov eax, dword [esi + 0xc]
test eax, eax
jle 0x509e81
call fcn.0040b720
mov ecx, dword [eax + 0x80]
test ecx, ecx
jne 0x509e6f
call fcn.0040b720
mov dword [eax + 0x80], 1
push esi
call fcn.004db92d
add esp, 4
mov byte [ebp - 4], 1
jmp 0x50a147
mov ecx, dword [esi]
mov dword [esi + 0xc], 0
push ecx
call dword [sym.imp.OLEAUT32.dll_VariantInit]
test eax, eax
mov dword [ebp + 0xc], eax
jne 0x509ec6
push esi
call fcn.004a9970
push esi
call fcn.004db92d
add esp, 4
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call fcn.004dbbcb
mov dword [ebp - 4], ebx
jmp 0x50a1e7
mov edx, dword [ebp - 0x14]
push 0
push 0
push 2
push 0
push 0
push 0x40000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, eax
lea eax, [ebp - 0x24]
push 0
push eax
lea ecx, [ebp + 0x16]
push 2
push ecx
push edi
mov byte [ebp + 0x16], 0xff
mov byte [ebp + 0x17], 0xfe
call ebx
mov eax, dword [ebp + 0xc]
lea edx, [ebp - 0x24]
push 0
push edx
mov edx, dword [esi]
lea ecx, [eax + eax]
push ecx
push edx
push edi
call ebx
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.004a9970
push esi
call fcn.004db92d
add esp, 4
mov dword [ebp - 4], 1
jmp 0x50a147
push str.pdftotext.dll
mov dword [ebp + 0xc], 1
mov byte [ebp - 4], 8
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test eax, eax
mov dword [ebp - 0x20], eax
je 0x50a1d4
push str.GetUnicodeTextContent
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
mov dword [ebp + 0x14], eax
je 0x50a04a
mov eax, dword [ebp + 8]
mov dword [ebp - 0x2c], 0
push eax
mov dword [ebp - 0x28], 0
call fcn.004bf79a
mov edi, eax
lea ebx, [edi + edi]
push ebx
call fcn.004db904
mov ecx, dword [ebp + 8]
add esp, 8
dec ebx
mov esi, eax
push 0
push 0
push ebx
push esi
push edi
push ecx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea edx, [ebp - 0x2c]
push 0
push edx
push 0
push 0
push esi
mov byte [eax + esi], 0
call dword [ebp + 0x14]
add esp, 0x14
mov edi, eax
push esi
call fcn.004db92d
add esp, 4
test edi, edi
je 0x50a04a
mov eax, dword [ebp - 0x14]
push 0
push 0
push 2
push 0
push 0
push 0x40000000
push eax
mov dword [ebp + 0xc], 0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
lea ecx, [ebp - 0x24]
push 0
push ecx
lea edx, [ebp + 0x16]
mov esi, eax
push 2
push edx
push esi
mov byte [ebp + 0x16], 0xfe
mov byte [ebp + 0x17], 0xff
call ebx
fld qword [ebp - 0x2c]
call fcn.004bf8e8
cmp eax, 6
jbe 0x50a02a
lea edx, [eax + edi - 6]
mov ecx, 0x539548
mov edx, dword [edx]
cmp edx, dword [ecx]
jne 0x50a02a
sub eax, 6
lea ecx, [ebp - 0x24]
push 0
push ecx
push eax
push edi
push esi
call ebx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x8000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 4], 1
test eax, eax
je 0x50a147
jmp 0x50a1d4
mov edi, dword [ebp - 0x20]
test edi, edi
jl 0x50a1d4
mov eax, dword [0x5748d0]
mov dword [ebp + 0xc], eax
mov ecx, dword [esi + 0x288]
lea edi, [edi + edi*4]
shl edi, 2
mov byte [ebp - 4], 0xa
mov edx, dword [edi + ecx + 8]
lea eax, [edi + ecx + 8]
mov ecx, dword [edx - 8]
test ecx, ecx
jne 0x50a0be
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp + 8]
push eax
push ecx
lea edx, [ebp + 0xc]
push str.__s____s_
push edx
call fcn.004d3827
add esp, 0x10
jmp 0x50a105
push eax
lea ecx, [ebp + 0xc]
call fcn.004dbd12
mov eax, dword [ebp + 8]
push 1
push eax
lea ecx, [ebp + 0xc]
push str._Source_File
push ecx
call fcn.0048b660
add esp, 0x10
test eax, eax
je 0x50a1c8
mov edx, dword [ebp - 0x14]
push 1
push edx
lea eax, [ebp + 0xc]
push str._Converted_File
push eax
call fcn.0048b660
add esp, 0x10
test eax, eax
je 0x50a1c8
mov ecx, dword [esi + 0x288]
mov edx, dword [ebp + 0xc]
push 1
push 0
mov eax, dword [edi + ecx + 4]
push 0
push edx
push eax
call fcn.0048b7c0
add esp, 0x14
test eax, eax
je 0x50a1c8
mov ecx, dword [esi + 0x288]
add edi, ecx
mov ecx, dword [ebp - 0x28]
push edi
call fcn.004dbd12
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 1
call fcn.004dbbcb
mov eax, dword [ebp - 0x14]
push eax
call fcn.0048bf80
add esp, 4
test eax, eax
je 0x50a1d4
lea ecx, [ebp - 0x34]
lea edx, [ebp - 0x3c]
push ecx
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x44]
push edx
push eax
push ecx
call fcn.0048be70
add esp, 0x10
test eax, eax
je 0x50a18b
lea edx, [ebp - 0x34]
lea eax, [ebp - 0x3c]
push edx
mov edx, dword [ebp - 0x14]
lea ecx, [ebp - 0x44]
push eax
push ecx
push edx
call fcn.0048bec0
add esp, 0x10
mov ecx, dword [ebp + 0x10]
lea eax, [ebp - 0x14]
push eax
call fcn.004dbd12
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call fcn.004dbbcb
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0xffffffff
call fcn.004dbbcb
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], 1
call fcn.004dbbcb
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call fcn.004dbbcb
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call fcn.004dbbcb
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor eax, eax
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x10