Function at 0x10296d6
Capabilities:
Get file size

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xa48
mov eax, dword [0x1048628]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
test esi, esi
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0xa38], esi
mov dword [ebp - 0xa3c], ebx
mov dword [ebp - 0xa40], eax
jne 0x1029714
mov eax, 0x80004003
jmp 0x1029db0
test ebx, ebx
jne 0x1029722
test eax, eax
jne 0x1029722
push esi
call fcn.0101a89d
push esi
call fcn.010257cb
test eax, eax
jne 0x102973c
mov eax, ebx
neg eax
sbb eax, eax
and eax, 0x80070002
jmp 0x1029db0
test ebx, ebx
push edi
mov edi, 0x208
je 0x102987f
cmp dword [ebp + 0x14], 0
je 0x1029762
lea eax, [ebp - 0xa48]
push eax
push ebx
call fcn.010257f7
call fcn.01028a62
cmp dword [ebp + 0x10], 0
je 0x102987f
push edi
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
test esi, esi
pop ecx
jne 0x1029783
mov eax, 0x8007000e
jmp 0x1029daf
mov ebx, 0x104
push ebx
push esi
push dword [ebp - 0xa3c]
call fcn.010272ee
push esi
call fcn.0102534f
cmp dword [ebp - 0xa40], 0
je 0x10297c2
push dword [ebp - 0xa40]
lea eax, [ebp - 0x224]
push esi
push 0x1006020
push ebx
push eax
call fcn.0100f541
add esp, 0x14
jmp 0x10297f4
push dword [0x104a438]
lea eax, [ebp - 0x224]
push esi
push 0x1005ac8
push ebx
push eax
call fcn.0100f541
add esp, 0x14
inc dword [0x104a438]
lea eax, [ebp - 0x224]
push eax
call fcn.010257cb
test eax, eax
jne 0x10297c2
push esi
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
cmp dword [ebp + 0x14], 0
pop ecx
je 0x102980f
push 0
lea eax, [ebp - 0x224]
push eax
call fcn.01028adf
push 1
lea eax, [ebp - 0x224]
push eax
push dword [ebp - 0xa38]
call fcn.0101a464
test eax, eax
jne 0x1029897
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jne 0x1029838
push 0x57
pop eax
test eax, eax
jg 0x1029845
call esi
test eax, eax
jne 0x1029858
push 0x57
pop eax
jmp 0x1029858
call esi
test eax, eax
jne 0x102984e
push 0x57
pop eax
and eax, 0xffff
or eax, 0x80070000
push eax
lea eax, [ebp - 0x224]
push eax
push dword [ebp - 0xa38]
push 0x1005fd0
push 0
call fcn.0102ae85
add esp, 0x14
mov eax, 0x80004005
jmp 0x1029daf
push dword [ebp - 0xa38]
mov ebx, 0x104
push ebx
lea eax, [ebp - 0x224]
push eax
call fcn.0100edc7
xor esi, esi
push esi
push esi
push esi
push 4
call fcn.01028147
test eax, eax
je 0x1029b2a
push edi
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
cmp eax, esi
pop ecx
mov dword [ebp - 0xa38], eax
je 0x1029a41
and dword [ebp - 0xa44], esi
push eax
push ebx
mov edi, 0x80004005
call fcn.0101b2e6
test eax, eax
je 0x1029a25
push dword [ebp - 0xa38]
call fcn.0102771e
push dword [ebp - 0xa38]
call fcn.0102534f
and dword [0x104a438], esi
cmp dword [ebp - 0xa40], esi
je 0x1029921
push dword [ebp - 0xa40]
lea eax, [ebp - 0x42c]
push dword [ebp - 0xa38]
push 0x1006020
push ebx
push eax
call fcn.0100f541
add esp, 0x14
jmp 0x1029958
push dword [0x104a438]
lea eax, [ebp - 0x42c]
push dword [ebp - 0xa38]
push 0x1005ac8
push ebx
push eax
call fcn.0100f541
add esp, 0x14
inc dword [0x104a438]
lea eax, [ebp - 0x42c]
push eax
call fcn.010257cb
test eax, eax
jne 0x1029921
mov ebx, dword [ebp - 0xa3c]
xor esi, esi
cmp ebx, esi
je 0x10299c0
cmp dword [ebp + 0x14], esi
je 0x1029970
push esi
push ebx
call fcn.01028adf
lea eax, [ebp - 0x42c]
push eax
push ebx
call fcn.0101ba19
test eax, eax
je 0x1029a25
push ebx
call fcn.010257cb
test eax, eax
je 0x102999f
push ebx
push 0x1005f88
push 1
call fcn.0102ae85
add esp, 0xc
cmp dword [ebp + 0x14], esi
je 0x10299ab
push esi
push ebx
call fcn.01028adf
push ebx
lea eax, [ebp - 0x224]
push eax
call fcn.0101ba19
mov dword [ebp - 0xa44], eax
jmp 0x10299f7
lea eax, [ebp - 0x42c]
push eax
lea eax, [ebp - 0x224]
push eax
call fcn.0101ba19
test eax, eax
je 0x1029a25
lea eax, [ebp - 0x224]
push eax
push 0x1005f44
push 5
call fcn.0102ae85
add esp, 0xc
mov dword [ebp - 0xa44], 1
push esi
push esi
lea eax, [ebp - 0x42c]
push esi
push eax
call fcn.01029022
mov edi, eax
cmp edi, 0xd2af9
jne 0x1029a25
push esi
lea eax, [ebp - 0x42c]
push eax
mov ecx, 0x104a2f8
push 2
dec edi
call fcn.01027843
push dword [ebp - 0xa38]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
cmp dword [ebp - 0xa44], 0
pop ecx
je 0x1029a41
mov eax, edi
jmp 0x1029daf
mov edi, dword [ebp - 0xa3c]
push 5
push edi
lea eax, [ebp - 0x224]
push eax
call fcn.0101b971
test eax, eax
je 0x1029acc
test edi, edi
je 0x1029a8b
push edi
call dword [sym.imp.msvcrt.dll_wcslen]
test eax, eax
pop ecx
je 0x1029a8b
xor ecx, ecx
cmp word [edi + eax*2 - 2], 0x5c
sete cl
mov eax, ecx
test eax, eax
je 0x1029a8b
push edi
push 0x1005f20
push 2
call fcn.0102ae85
add esp, 0xc
lea eax, [ebp - 0x224]
push eax
push 0x1005ef0
push 2
call fcn.0102ae85
add esp, 0xc
cmp dword [ebp + 0x1c], 0
mov ecx, 0x104a2f8
lea eax, [ebp - 0x224]
je 0x1029ab8
push edi
jmp 0x1029da2
push 0
push eax
push 2
call fcn.01027843
mov eax, 0xd2af8
jmp 0x1029daf
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jne 0x1029add
push 0x57
pop eax
test eax, eax
jg 0x1029aea
call esi
test eax, eax
jne 0x1029afd
push 0x57
pop eax
jmp 0x1029afd
call esi
test eax, eax
jne 0x1029af3
push 0x57
pop eax
and eax, 0xffff
or eax, 0x80070000
push eax
lea eax, [ebp - 0x224]
push eax
push 0x1005eb4
push 2
call fcn.0102ae85
add esp, 0x10
push 1
push 1
push edi
lea eax, [ebp - 0x224]
push eax
call fcn.01029022
jmp 0x1029daf
push ebx
lea eax, [ebp - 0x224]
push eax
push eax
call fcn.0101d2be
test eax, eax
je 0x1029875
cmp dword [ebp - 0xa3c], esi
lea eax, [ebp - 0x42c]
je 0x1029b72
push dword [ebp - 0xa3c]
push ebx
push eax
call fcn.0100edc7
push ebx
lea eax, [ebp - 0x42c]
push eax
push eax
call fcn.0101d2be
test eax, eax
jne 0x1029b82
jmp 0x1029875
push 0x1005eac
push 0x103
push eax
call fcn.0100edc7
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x42c]
push eax
push 0x1005ea4
lea eax, [ebp - 0xa34]
push 0x400
push eax
call fcn.01017ed4
add esp, 0x14
test eax, eax
jl 0x1029d7f
lea eax, [ebp - 0xa34]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1029bba
and dword [ebp - 0xa44], 0
mov esi, 0x1005e98
lea edi, [ebp - 0x10]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov esi, 0x1005e8c
lea edi, [ebp - 0x1c]
movsd dword es:[edi], dword [esi]
sub eax, edx
movsd dword es:[edi], dword [esi]
mov dword [ebp - 0xa40], eax
push ebx
lea eax, [ebp - 0x634]
push eax
movsb byte es:[edi], byte [esi]
call fcn.0101d0b6
test eax, eax
je 0x1029875
push 0x1005e70
push ebx
lea eax, [ebp - 0x634]
push eax
call fcn.0100f5a7
xor edi, edi
push edi
push 0x8000080
push 4
push edi
push edi
push 0xc0000000
lea eax, [ebp - 0x634]
push eax
call fcn.0101a677
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp - 0xa48], esi
je 0x1029875
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x1029c58
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1029875
mov eax, dword [ebp - 0xa40]
push edi
lea eax, [ebx + eax + 0xa]
push eax
push edi
push 4
push edi
push esi
call fcn.0101cf0d
cmp eax, edi
mov dword [ebp - 0xa38], eax
je 0x1029d67
push edi
push edi
push edi
push 2
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
cmp eax, edi
mov dword [ebp - 0xa3c], eax
je 0x1029d5b
cmp ebx, edi
jbe 0x1029cb0
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0xa3c]
call dword [sym.imp.msvcrt.dll_strstr]
cmp eax, edi
pop ecx
pop ecx
jne 0x1029ce1
push 0xb
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0xa3c]
add eax, ebx
push eax
call dword [sym.imp.msvcrt.dll_strncpy]
lea eax, [ebp - 0x10]
add esp, 0xc
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1029cce
sub eax, esi
add ebx, eax
mov dword [ebp - 0xa44], ebx
jmp 0x1029d1d
push 0xa
push eax
call dword [sym.imp.msvcrt.dll_strchr]
mov esi, eax
cmp esi, edi
pop ecx
pop ecx
je 0x1029d1d
mov eax, dword [ebp - 0xa3c]
inc esi
sub eax, esi
add eax, ebx
push eax
mov eax, dword [ebp - 0xa40]
add eax, esi
push esi
push eax
call dword [sym.imp.msvcrt.dll_memmove]
add esp, 0xc
sub esi, dword [ebp - 0xa3c]
mov dword [ebp - 0xa44], esi
mov eax, dword [ebp - 0xa3c]
mov edx, dword [ebp - 0xa44]
mov ecx, dword [ebp - 0xa40]
lea edi, [eax + edx]
mov edx, ecx
shr ecx, 2
lea esi, [ebp - 0xa34]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
add ebx, dword [ebp - 0xa40]
mov esi, dword [ebp - 0xa48]
xor edi, edi
push dword [ebp - 0xa38]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x224]
push eax
push 0x1005ef0
push 2
call fcn.0102ae85
add esp, 0xc
push 0
lea eax, [ebp - 0x224]
mov ecx, 0x104a2f8
push eax
push 8
call fcn.01027843
mov eax, 0xd2af9
pop edi
mov ecx, dword [ebp - 4]
pop esi
pop ebx
call fcn.01018732
leave
ret 0x18