Function at 0x503250
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x597c6c
mov eax, dword fs:[0]
push eax
sub esp, 0x340
mov eax, dword [0x601018]
xor eax, esp
mov dword [esp + 0x338], eax
push ebx
push esi
push edi
mov eax, dword [0x601018]
xor eax, esp
push eax
lea eax, [esp + 0x350]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
push 0x58
push 0
push eax
mov edi, ecx
mov dword [esp + 0x24], eax
call sub.MSVCR100.dll_memset
mov eax, dword [edi]
mov edx, dword [eax + 0x38]
add esp, 0xc
push 0
push 0
push 0
mov ecx, edi
call edx
mov eax, dword [edi]
mov edx, dword [eax + 0x14]
mov ecx, edi
call edx
test eax, eax
je 0x503369
push str.unable_to_seek_to_compressed_file_header
mov eax, 0x2e73
lea ecx, [esp + 0x78]
call fcn.005064b0
mov esi, eax
mov dword [esp + 0x358], 0
mov eax, dword [edi]
mov edx, dword [eax + 0xc]
mov ecx, edi
call edx
mov ebx, eax
mov eax, dword [edi]
mov edx, dword [eax + 0x14]
mov ecx, edi
call edx
mov edi, eax
mov ecx, esi
call fcn.005067d0
xor edi, edi
mov esi, eax
cmp ebx, edi
je 0x50331e
cmp byte [ebx], 0
je 0x50331e
push ebx
push str.filename___s_
call fcn.00506600
add esp, 8
mov eax, dword [esi]
mov ecx, dword [esi + 0x108]
push eax
push ecx
push 0x5cb5f8
mov ecx, 0x610240
call fcn.00504670
add esp, 0xc
cmp dword [esi + 0x114], edi
mov dword [esi + 0x110], edi
je 0x50334e
mov edi, dword [esi + 0x118]
lea esi, [esp + 0x74]
mov dword [esp + 0x358], 0xffffffff
call fcn.00506520
mov eax, edi
jmp 0x5037c3
push 0x50
lea edx, [esp + 0x2f8]
push 0
push edx
call sub.MSVCR100.dll_memset
mov eax, dword [edi]
mov edx, dword [eax + 0x28]
add esp, 0xc
push 0x50
lea ecx, [esp + 0x2f8]
push ecx
mov ecx, edi
call edx
mov ebx, eax
mov eax, dword [edi]
mov edx, dword [eax + 0x14]
mov ecx, edi
call edx
test eax, eax
je 0x503413
push str.unable_to_read_header_of_compressed_file
mov eax, 0x2e74
lea ecx, [esp + 0x78]
call fcn.005064b0
mov esi, eax
mov dword [esp + 0x358], 1
mov eax, dword [edi]
mov edx, dword [eax + 0xc]
mov ecx, edi
call edx
test eax, eax
je 0x5033df
cmp byte [eax], 0
je 0x5033df
push eax
push str.filename___s_
call fcn.00506600
add esp, 8
mov eax, dword [edi]
mov edx, dword [eax + 0x14]
mov ecx, edi
call edx
mov edi, eax
mov ecx, esi
call fcn.005067d0
mov esi, eax
mov eax, dword [esi]
mov ecx, dword [esi + 0x108]
push eax
push ecx
push 0x5cb5f8
mov ecx, 0x610240
call fcn.00504670
xor edi, edi
jmp 0x503337
cmp ebx, 0x50
je 0x50348b
push str.unable_to_read_complete_compressed_file_header
mov eax, 0x2e75
lea ecx, [esp + 0x78]
call fcn.005064b0
mov esi, eax
push 0x50
push str.requested
push str._s___d_
mov dword [esp + 0x364], 2
call fcn.00506600
add esp, 0xc
push ebx
push str.received
push str._s___d_
call fcn.00506600
mov edx, dword [edi]
mov eax, dword [edx + 0xc]
add esp, 0xc
mov ecx, edi
call eax
test eax, eax
je 0x50347f
cmp byte [eax], 0
je 0x50347f
push eax
push str.filename___s_
call fcn.00506600
add esp, 8
call fcn.00506900
mov edi, eax
jmp 0x50334e
push 0x58
lea ecx, [esp + 0x20]
push 0
push ecx
call sub.MSVCR100.dll_memset
mov edx, dword [esp + 0x300]
movzx ecx, byte [esp + 0x30b]
mov eax, dword [esp + 0x304]
movzx esi, byte [esp + 0x30f]
mov dword [esp + 0x2c], edx
movzx edx, byte [esp + 0x30a]
shl ecx, 8
or ecx, edx
movzx edx, byte [esp + 0x308]
mov dword [esp + 0x30], eax
movzx eax, byte [esp + 0x309]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x30e]
shl ecx, 8
or ecx, edx
movzx edx, byte [esp + 0x30c]
shl esi, 8
or esi, eax
mov dword [esp + 0x34], ecx
movzx ecx, byte [esp + 0x30d]
shl esi, 8
or esi, ecx
shl esi, 8
or esi, edx
add esp, 0xc
lea ecx, [esp + 0x304]
mov dword [esp + 0x2c], esi
call fcn.00503ae0
lea ecx, [esp + 0x30c]
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], edx
call fcn.00503ae0
movzx ecx, byte [esp + 0x317]
mov dword [esp + 0x3c], eax
movzx eax, byte [esp + 0x316]
mov dword [esp + 0x40], edx
movzx edx, byte [esp + 0x315]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x314]
shl ecx, 8
or ecx, edx
movzx edx, byte [esp + 0x31b]
shl edx, 8
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x31a]
or edx, eax
movzx eax, byte [esp + 0x319]
shl edx, 8
or edx, eax
movzx eax, byte [esp + 0x318]
shl edx, 8
or edx, eax
movzx eax, byte [esp + 0x31e]
mov dword [esp + 0x48], edx
movzx edx, byte [esp + 0x31f]
shl edx, 8
or edx, eax
movzx eax, byte [esp + 0x31d]
shl edx, 8
or edx, eax
movzx eax, byte [esp + 0x31c]
shl edx, 8
or edx, eax
movzx eax, byte [esp + 0x323]
mov dword [esp + 0x4c], edx
movzx edx, byte [esp + 0x322]
shl eax, 8
or eax, edx
movzx edx, byte [esp + 0x321]
shl eax, 8
or eax, edx
mov dword [esp + 0x44], ecx
shl eax, 8
movzx edx, byte [esp + 0x320]
or eax, edx
mov edx, dword [esp + 0x324]
mov dword [esp + 0x54], edx
mov edx, dword [esp + 0x328]
mov dword [esp + 0x58], edx
mov edx, dword [esp + 0x32c]
mov dword [esp + 0x5c], edx
mov edx, dword [esp + 0x330]
mov dword [esp + 0x60], edx
mov edx, dword [esp + 0x334]
mov dword [esp + 0x64], edx
mov edx, dword [esp + 0x338]
mov dword [esp + 0x68], edx
mov edx, dword [esp + 0x33c]
mov dword [esp + 0x6c], edx
mov edx, dword [esp + 0x340]
mov dword [esp + 0x70], edx
xor edx, edx
mov dword [esp + 0x50], eax
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], 8
mov ebx, dword [esp + edx + 0x20]
cmp ebx, dword [edx + str.VisionR]
jne 0x503693
mov ebx, dword [esp + 0x14]
sub ebx, 4
add edx, 4
mov dword [esp + 0x14], ebx
cmp ebx, 4
jae 0x503672
jmp 0x50369b
mov dword [esp + 0x10], 1
cmp byte [esp + 0x324], 0
jne 0x5036aa
or dword [esp + 0x10], 2
cmp byte [esp + 0x334], 0
jne 0x5036b9
or dword [esp + 0x10], 4
cmp dword [esp + 0x38], 0
jg 0x5036ce
jl 0x5036c9
cmp dword [esp + 0x34], 1
jae 0x5036ce
or dword [esp + 0x10], 8
mov edx, dword [esp + 0x3c]
or edx, dword [esp + 0x40]
mov ebx, dword [esp + 0x10]
jne 0x5036df
or ebx, 0x10
test ecx, ecx
jns 0x5036e6
or ebx, 0x20
test eax, eax
jns 0x5036ed
or ebx, 0x40
cmp esi, 0x14
jle 0x5036f8
or ebx, 0x80
cmp esi, 5
jge 0x503707
test esi, esi
je 0x503707
or ebx, 0x100
test ebx, ebx
je 0x5037b2
push str.invalid_header_detected_in_compressed_file
mov eax, 0x2e76
lea ecx, [esp + 0x1b8]
call fcn.005064b0
mov esi, eax
push ebx
push str.reason
push str._s__0x_08X_
mov dword [esp + 0x364], 3
call fcn.00506600
mov eax, dword [edi]
mov edx, dword [eax + 0xc]
add esp, 0xc
mov ecx, edi
call edx
xor edi, edi
cmp eax, edi
je 0x503767
cmp byte [eax], 0
je 0x503767
push eax
push str.filename___s_
call fcn.00506600
add esp, 8
mov eax, dword [esi]
mov ecx, dword [esi + 0x108]
push eax
push ecx
push 0x5cb5f8
mov ecx, 0x610240
call fcn.00504670
add esp, 0xc
mov dword [esi + 0x110], edi
cmp dword [esi + 0x114], edi
je 0x503797
mov edi, dword [esi + 0x118]
lea esi, [esp + 0x1b4]
mov dword [esp + 0x358], 0xffffffff
call fcn.00506520
mov eax, edi
jmp 0x5037c3
mov edi, dword [esp + 0x18]
mov ecx, 0x16
lea esi, [esp + 0x1c]
rep movsd dword es:[edi], dword [esi]
xor eax, eax
mov ecx, dword [esp + 0x350]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x338]
xor ecx, esp
call fcn.00596083
mov esp, ebp
pop ebp
ret