Function at 0x528170
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x597b2b
mov eax, dword fs:[0]
push eax
sub esp, 0xc54
mov eax, dword [0x601018]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor ebx, ebx
mov esi, 1
mov dword [eax], ebx
mov dword [ebp - 0xc50], eax
mov dword [ebp - 0xc54], ecx
mov dword [ecx], ebx
mov byte [ebp - 0xc44], bl
mov byte [ebp - 0x82c], bl
mov dword [ebp - 0x83c], esi
mov dword [ebp - 0x844], ebx
mov dword [ebp - 0x840], ebx
mov dword [ebp - 0x42c], ebx
mov dword [ebp - 0x420], ebx
push 0x10000
mov dword [ebp - 4], ebx
call fcn.00596073
add esp, 4
push ebx
push ebx
push 3
push ebx
push ebx
push closesocket
push edi
mov dword [ebp - 0x42c], eax
mov dword [ebp - 0x428], eax
mov dword [ebp - 0x424], eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x844], eax
mov dword [ebp - 0x840], ebx
cmp eax, 0xffffffff
je 0x5282a4
lea edx, [ebp - 0xc44]
mov eax, edi
sub edx, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, esi
cmp cl, bl
jne 0x528230
mov esi, dword [ebp - 0x844]
mov dword [ebp - 0x83c], ebx
cmp esi, 0xffffffff
jne 0x5282da
mov esi, dword [ebp - 0x42c]
cmp esi, ebx
je 0x52826c
push esi
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor esi, esi
mov dword [ebp - 0x42c], esi
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push str.ERROR_:_failed_to_open_PDF_file____s___when_checking_version
mov ecx, 0x610240
mov dword [ebp - 0x844], ebx
call fcn.00504670
add esp, 8
cmp esi, ebx
je 0x5283f3
push esi
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
jmp 0x5283f3
mov dword [ebp - 0x83c], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor esi, esi
mov dword [ebp - 0x840], eax
mov dword [ebp - 0x844], esi
cmp dword [0x61025c], ebx
je 0x5282da
push eax
push edi
push str.ERROR_15113:_unable_to_open_file___s___GetLastError__d_
mov ecx, 0x610240
call fcn.00504670
add esp, 0xc
or eax, 0xffffffff
mov dword [ebp - 0xc4c], eax
mov dword [ebp - 0xc48], eax
lea eax, [ebp - 0xc5c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x528313
mov ecx, dword [ebp - 0xc5c]
mov edx, dword [ebp - 0xc58]
mov dword [ebp - 0xc4c], ecx
mov dword [ebp - 0xc48], edx
lea eax, [ebp - 0x414]
push eax
lea esi, [ebp - 0xc44]
call fcn.00550fc0
mov esi, dword [ebp - 0x42c]
cmp esi, ebx
je 0x528341
push esi
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
xor esi, esi
mov dword [ebp - 0x42c], esi
mov eax, dword [ebp - 0x844]
cmp eax, ebx
je 0x528358
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x844], ebx
cmp byte [ebp - 0x414], 0x25
jne 0x5283c1
cmp byte [ebp - 0x413], 0x50
jne 0x5283c1
cmp byte [ebp - 0x412], 0x44
jne 0x5283c1
cmp byte [ebp - 0x411], 0x46
jne 0x5283c1
cmp byte [ebp - 0x410], 0x2d
jne 0x5283c1
mov ecx, dword [ebp - 0xc54]
mov edx, dword [ebp - 0xc50]
push ecx
push edx
lea eax, [ebp - 0x414]
push str.__PDF__d._d
push eax
call dword [sym.imp.MSVCR100.dll_sscanf]
add esp, 0x10
lea esi, [ebp - 0xc44]
call fcn.00550f80
mov eax, dword [ebp - 0xc4c]
mov edx, dword [ebp - 0xc48]
jmp 0x5283f8
push edi
push str.ERROR_:_the_file____s___is_not_a_PDF_file
mov ecx, 0x610240
call fcn.00504670
add esp, 8
cmp esi, ebx
je 0x5283e2
push esi
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
add esp, 4
mov eax, dword [ebp - 0x844]
cmp eax, ebx
je 0x5283f3
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or eax, 0xffffffff
or edx, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00596083
mov esp, ebp
pop ebp
ret