Function at 0x494940
Capabilities:
Get file size
Parse pe header
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4ac6b0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x30
push ebx
mov ebx, ecx
push esi
push edi
mov eax, dword [ebx + 8]
xor edi, edi
cmp eax, edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 4], edi
mov dword [ebx + 0xa0], edi
je 0x49497d
call fcn.00495090
cmp dword [ebp + 0xc], edi
jne 0x494987
mov dword [ebx + 0x20], edi
jmp 0x49498e
mov dword [ebx + 0x20], 1
lea ecx, [ebx + 0x24]
call fcn.0049ad90
push 0x10000
call fcn.004a4650
add esp, 4
cmp eax, edi
mov dword [ebx + 0x7c], eax
jne 0x4949bf
push 0x53c314
push edi
push 0x53
push str.D:SVN360BaseQHPEParser.cpp
call fcn.004a3d40
add esp, 0x10
mov esi, dword [ebp + 8]
push edi
push 0x80
push 3
push edi
push 1
push closesocket
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebx + 8], eax
jne 0x4949f7
push esi
push str.CreateFile__s__
push edi
push 0x56
push str.D:SVN360BaseQHPEParser.cpp
call fcn.004a3d40
add esp, 0x14
lea eax, [ebx + 0x10]
push eax
mov eax, dword [ebx + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x494a1e
push str.GetFileSizeEx__
push edi
push 0x57
push str.D:SVN360BaseQHPEParser.cpp
call fcn.004a3d40
add esp, 0x10
mov edx, dword [ebx + 8]
lea ecx, [ebp - 0x14]
push edi
lea esi, [ebx + 0xa4]
push ecx
push 2
push esi
mov dword [ebx + 0x98], edi
mov dword [ebx + 0x90], edi
mov dword [ebx + 0x88], edi
push edx
mov dword [ebx + 0x9c], edi
mov dword [ebx + 0x94], edi
mov dword [ebx + 0x8c], edi
mov dword [ebx + 0x80], edi
mov word [esi], di
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x494a80
mov eax, dword [ebp + 8]
push eax
push str.ReadFile__s__
push edi
push 0x63
push str.D:SVN360BaseQHPEParser.cpp
call fcn.004a3d40
add esp, 0x14
cmp word [esi], 0x5a4d
je 0x494a9d
push str.DOS
push 1
push 0x64
push str.D:SVN360BaseQHPEParser.cpp
call fcn.004a44d0
add esp, 0x10
mov edx, dword [ebx + 0x20]
xor ecx, ecx
push edx
xor eax, eax
push 0x40
push ecx
push eax
push esi
mov ecx, ebx
call fcn.00496930
cmp eax, edi
jne 0x494aba
call fcn.004a45e0
mov eax, dword [ebx + 0xe0]
mov edx, dword [ebx + 0x14]
xor ecx, ecx
add eax, 4
cmp ecx, edx
jl 0x494af3
jg 0x494ad3
cmp eax, dword [ebx + 0x10]
jbe 0x494af3
push 0x53c27c
push 1
push 0x6e
push str.D:SVN360BaseQHPEParser.cpp
mov dword [ebx + 0xa0], 2
call fcn.004a44d0
add esp, 0x10
mov eax, dword [ebx + 0xe0]
lea ecx, [ebp - 0x18]
cdq
mov esi, eax
mov eax, dword [ebx + 0x20]
mov edi, edx
push eax
push 4
push edi
push esi
push ecx
mov ecx, ebx
call fcn.00496930
test eax, eax
jne 0x494b1a
call fcn.004a45e0
mov ecx, dword [ebp - 0x18]
mov eax, ecx
and eax, 0xffff
sub eax, 0x454c
je 0x494b78
sub eax, 2
je 0x494b63
sub eax, 2
je 0x494b4d
push 0x53c27c
push 1
mov dword [ebx + 0xa0], 2
push 0x86
jmp 0x494b8b
cmp ecx, 0x4550
je 0x494b98
push 0x53c270
push 1
push 0x82
jmp 0x494b8b
push 0x53c25c
push 1
mov dword [ebx + 0xa0], 3
push 0x7a
jmp 0x494b8b
push 0x53c248
push 1
mov dword [ebx + 0xa0], 4
push 0x7e
push str.D:SVN360BaseQHPEParser.cpp
call fcn.004a44d0
add esp, 0x10
mov edx, dword [ebx + 0x20]
add esi, 4
adc edi, 0
push edx
push 0x14
lea eax, [ebx + 0xe4]
push edi
push esi
push eax
mov ecx, ebx
mov dword [ebx + 0xa0], 6
call fcn.00496930
test eax, eax
jne 0x494bc7
call fcn.004a45e0
mov ax, word [ebx + 0xe4]
add esi, 0x14
adc edi, 0
cmp ax, 0x14c
mov dword [ebp - 0x2c], edi
je 0x494c0c
cmp ax, 0x200
je 0x494c0c
cmp ax, 0x8664
je 0x494c0c
push 0x53c228
push 1
push 0x94
push str.D:SVN360BaseQHPEParser.cpp
mov dword [ebx + 0xa0], 5
call fcn.004a44d0
add esp, 0x10
mov ecx, dword [ebx + 0x20]
lea eax, [ebx + 0xf8]
push ecx
push 2
push edi
push esi
push eax
mov ecx, ebx
call fcn.00496930
test eax, eax
jne 0x494c2b
call fcn.004a45e0
mov ax, word [ebx + 0xf8]
cmp ax, 0x10b
jne 0x494cdf
xor eax, eax
mov ax, word [ebx + 0xf4]
cmp eax, 0xe0
mov dword [ebp - 0x14], eax
jbe 0x494c57
mov eax, 0xe0
mov dword [ebp - 0x14], eax
mov edx, dword [ebx + 0x20]
lea edi, [ebx + 0x1b4]
push edx
push eax
mov eax, dword [ebp - 0x2c]
mov ecx, ebx
push eax
push esi
push edi
call fcn.00496930
test eax, eax
jne 0x494c78
call fcn.004a45e0
lea ecx, [edi + 0x60]
mov dword [ebx + 0x120], edi
mov dword [ebx + 0x128], ecx
mov edx, dword [edi + 0x5c]
mov dword [ebx + 0xfc], edx
mov eax, dword [edi + 0x10]
mov dword [ebx + 0x100], eax
mov ecx, dword [edi + 0x20]
mov dword [ebx + 0x104], ecx
mov edx, dword [edi + 0x38]
mov dword [ebx + 0x10c], edx
mov eax, dword [edi + 0x24]
mov dword [ebx + 0x108], eax
mov ecx, dword [edi + 4]
mov dword [ebx + 0x110], ecx
mov edx, dword [edi + 0x1c]
xor eax, eax
mov dword [ebx + 0x118], edx
mov dword [ebx + 0x11c], eax
mov ecx, dword [edi + 0x24]
mov edi, dword [ebp - 0x2c]
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], eax
jmp 0x494da7
cmp ax, 0x20b
jne 0x494d8e
xor eax, eax
mov ax, word [ebx + 0xf4]
cmp eax, 0xf0
mov dword [ebp - 0x14], eax
jbe 0x494d04
mov eax, 0xf0
mov dword [ebp - 0x14], eax
mov edx, dword [ebx + 0x20]
lea edi, [ebx + 0x1b4]
push edx
push eax
mov eax, dword [ebp - 0x2c]
mov ecx, ebx
push eax
push esi
push edi
call fcn.00496930
test eax, eax
jne 0x494d25
call fcn.004a45e0
lea ecx, [edi + 0x70]
mov dword [ebx + 0x124], edi
mov dword [ebx + 0x128], ecx
mov edx, dword [edi + 0x6c]
mov dword [ebx + 0xfc], edx
mov eax, dword [edi + 0x10]
mov dword [ebx + 0x100], eax
mov ecx, dword [edi + 0x20]
mov dword [ebx + 0x104], ecx
mov edx, dword [edi + 0x38]
mov dword [ebx + 0x10c], edx
mov eax, dword [edi + 0x24]
mov dword [ebx + 0x108], eax
mov ecx, dword [edi + 4]
mov dword [ebx + 0x110], ecx
mov edx, dword [edi + 0x18]
mov dword [ebx + 0x118], edx
mov eax, dword [edi + 0x1c]
mov dword [ebx + 0x11c], eax
mov ecx, dword [edi + 0x24]
mov edi, dword [ebp - 0x2c]
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], 0
jmp 0x494da7
push 0x53c210
push 1
push 0xbb
push str.D:SVN360BaseQHPEParser.cpp
call fcn.004a44d0
add esp, 0x10
mov ecx, dword [ebx + 0xfc]
mov eax, 0x10
cmp ecx, eax
jbe 0x494dbc
mov dword [ebx + 0xfc], eax
xor eax, eax
mov ecx, ebx
mov ax, word [ebx + 0xf4]
cdq
add esi, eax
adc edi, edx
call fcn.004973a0
test eax, eax
jne 0x494dda
call fcn.004a45e0
xor eax, eax
mov ax, word [ebx + 0xe6]
mov dword [ebx + 0x2a4], eax
lea edx, [eax + eax*4]
shl edx, 3
push edx
call fcn.004a4650
add esp, 4
mov dword [ebx + 0x2a8], eax
test eax, eax
jne 0x494e1a
push 0x53c314
push eax
push 0xc4
push str.D:SVN360BaseQHPEParser.cpp
call fcn.004a3d40
add esp, 0x10
mov eax, dword [ebx + 0x20]
mov edx, dword [ebx + 0x2a8]
push eax
mov eax, dword [ebx + 0x2a4]
lea ecx, [eax + eax*4]
shl ecx, 3
push ecx
push edi
push esi
push edx
mov ecx, ebx
call fcn.00496930
test eax, eax
jne 0x494e44
call fcn.004a45e0
mov eax, dword [ebx + 0x2a4]
mov ecx, ebx
lea eax, [eax + eax*4]
shl eax, 3
add esi, eax
adc edi, 0
call fcn.00497010
test eax, eax
jne 0x494e65
call fcn.004a45e0
mov ecx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x24]
mov edx, ecx
push eax
add edx, esi
mov esi, eax
adc esi, edi
sub edx, 1
sbb esi, 0
push ecx
push esi
push edx
call sub.ntdll.dll__alldiv
mov ecx, dword [ebp - 0x24]
push ecx
mov ecx, dword [ebp - 0x28]
push ecx
push edx
push eax
call sub.ntdll.dll__allmul
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x1c], edx
mov edx, dword [ebx + 0x2a4]
shl edx, 2
push edx
call fcn.004a4650
add esp, 4
mov dword [ebx + 0x2ac], eax
test eax, eax
jne 0x494ecb
push 0x53c314
push eax
push 0xcc
push str.D:SVN360BaseQHPEParser.cpp
call fcn.004a3d40
add esp, 0x10
mov ecx, dword [ebx + 0x2a4]
mov edi, dword [ebx + 0x2ac]
shl ecx, 2
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
xor esi, esi
rep stosb byte es:[edi], al
mov dword [ebp + 8], esi
cmp esi, dword [ebx + 0x2a4]
jae 0x494f92
mov ecx, dword [ebx + 0x2a8]
lea eax, [esi + esi*4]
push 8
lea edx, [ecx + eax*8]
lea eax, [ebp - 0x3c]
push edx
push eax
call dword [sym.imp.ntdll.dll_strncpy]
lea edi, [ebp - 0x3c]
or ecx, 0xffffffff
xor eax, eax
mov byte [ebp - 0x34], 0
repne scasb al, byte es:[edi]
not ecx
push ecx
call fcn.004a4650
mov ecx, dword [ebx + 0x2ac]
add esp, 0x10
mov dword [ecx + esi*4], eax
mov edx, dword [ebx + 0x2ac]
cmp dword [edx + esi*4], 0
jne 0x494f5b
push 0x53c314
push 0
push 0xd6
push str.D:SVN360BaseQHPEParser.cpp
call fcn.004a3d40
add esp, 0x10
lea edi, [ebp - 0x3c]
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [ebx + 0x2ac]
repne scasb al, byte es:[edi]
mov eax, dword [ebp + 8]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
mov edi, dword [edi + eax*4]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
inc eax
rep movsb byte es:[edi], byte [esi]
mov dword [ebp + 8], eax
mov esi, eax
jmp 0x494eef
mov eax, dword [ebx + 0x2a4]
shl eax, 2
push eax
call fcn.004a4650
xor esi, esi
add esp, 4
cmp eax, esi
mov dword [ebx + 0x2b0], eax
jne 0x494fc8
push 0x53c314
push esi
push 0xdc
push str.D:SVN360BaseQHPEParser.cpp
call fcn.004a3d40
add esp, 0x10
mov ecx, ebx
call fcn.00496f00
mov ecx, dword [ebx + 0x2a4]
mov edx, dword [ebx + 0x2b0]
mov eax, dword [edx + ecx*4 - 4]
mov ecx, dword [ebx + 0x2a8]
lea eax, [eax + eax*4]
mov edx, dword [ecx + eax*8 + 0x14]
lea eax, [ecx + eax*8]
mov ecx, dword [eax + 0x10]
xor eax, eax
add edx, ecx
mov ecx, dword [ebx + 0x10]
sub ecx, edx
mov edx, dword [ebx + 0x14]
sbb edx, eax
mov dword [ebx + 0x2b8], ecx
mov eax, edx
mov dword [ebx + 0x2bc], edx
cmp eax, esi
jg 0x495028
jl 0x49501c
cmp dword [ebx + 0x2b8], esi
jae 0x495028
mov dword [ebx + 0x2b8], esi
mov dword [ebx + 0x2bc], esi
mov esi, 1
mov dword [ebx + 0xa0], esi
jmp 0x49504f
test esi, esi
mov dword [ebp - 4], 0xffffffff
jne 0x495061
mov ecx, ebx
call fcn.00495090
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8