Function at 0x1013fc40
Capabilities:
Get file size

Disassembly:
sub esp, 0x7c
push ebx
mov ebx, dword [esp + 0x88]
push ebp
push esi
mov esi, dword [0x1024aff0]
lea eax, [esp + 0x20]
push edi
xor edi, edi
push eax
push ebx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x3c], esi
xor ebp, ebp
mov dword [esp + 0x44], edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x2c], edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, eax
mov eax, dword [esp + 0x24]
cmp ecx, edi
mov dword [esp + 0x40], ecx
jne 0x1013fc8e
cmp eax, edi
je 0x101401b0
xor edx, edx
xor ebp, ebp
or edx, ecx
or eax, ebp
push esi
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], eax
call fcn.10063b18
mov ebp, eax
add esp, 4
cmp ebp, edi
je 0x101401c9
mov ecx, esi
xor eax, eax
mov edx, ecx
mov edi, ebp
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push esi
and ecx, 3
rep stosb byte es:[edi], al
call fcn.10063b18
add esp, 4
mov dword [esp + 0x18], eax
test eax, eax
je 0x101401e2
mov edi, dword [esp + 0x18]
mov ecx, esi
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push 0
and ecx, 3
push 0
push 0
push ebx
rep stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x48]
mov edi, dword [esp + 0x44]
test eax, eax
ja 0x1013fd11
cmp edi, 0x200
jbe 0x1013fd18
mov esi, 0x200
jmp 0x1013fd1a
mov esi, edi
mov ecx, dword [esp + 0x90]
push 0
lea eax, [esp + 0x14]
push 0
push eax
push esi
push ebp
push ebx
push ecx
mov dword [esp + 0x2c], 0
call fcn.10148b60
add esp, 0x1c
test eax, eax
je 0x101401fb
cmp esi, dword [esp + 0x10]
jne 0x10140214
mov eax, dword [ebp + 0x14]
xor ebx, ebx
push eax
push 0x20
push ebp
mov dword [ebp + 0x14], ebx
call fcn.10147d40
add esp, 0xc
test eax, eax
je 0x1014022d
mov eax, dword [esp + 0x10]
xor edx, edx
mov dx, word [ebp + 8]
cmp eax, edx
jb 0x10140246
mov eax, dword [ebp + 0x1c]
mov ecx, dword [esp + 0x48]
cmp eax, ecx
ja 0x1014025f
jb 0x1013fd9a
mov ecx, dword [ebp + 0x18]
cmp ecx, edi
ja 0x1014025f
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x1026e940], ebx
call esi
mov dword [0x1026e948], eax
mov eax, dword [0x1026e94c]
cmp eax, ebx
jne 0x1013fdec
mov dword [0x1026e940], 2
mov dword [0x1026e944], 0x27e
call esi
mov dword [0x1026e948], eax
mov dword [0x1026e940], 0x1f
mov dword [0x1026e944], 0xfbc
call esi
jmp 0x10140332
cmp dword [0x1026ee74], ebx
jne 0x1013fe3a
mov cl, byte [ebp + 6]
mov eax, dword [ebp + 0x10]
mov edx, dword [0x1026e958]
and ecx, 1
cmp eax, 0x2710
ja 0x1013fe1c
cmp edx, 0x2710
ja 0x1013fe3a
cmp edx, eax
je 0x1013fe3a
cmp eax, ebx
jne 0x1013fe2c
jmp 0x1013fe3a
cmp eax, edx
jne 0x1013fe2c
cmp dword [0x1026e960], ebx
ja 0x1013fe3a
cmp ecx, ebx
je 0x1013fe3a
push ecx
push eax
call fcn.1013a010
add esp, 8
cmp eax, ebx
je 0x1013fdd1
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0x4d]
mov byte [esp + 0x4c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea edx, [esp + 0x28]
lea ecx, [esp + 0x30]
stosb byte es:[edi], al
push edx
lea eax, [esp + 0x50]
push 0x40
push eax
xor edi, edi
push ecx
push ebp
mov dword [esp + 0x3c], edi
mov dword [esp + 0x44], edi
call fcn.1013a6d0
add esp, 0x14
test eax, eax
je 0x10140278
mov edx, dword [esp + 0x30]
push edx
call fcn.1014a910
mov ecx, eax
add esp, 4
cmp ecx, edi
mov dword [esp + 0x38], ecx
je 0x10140291
mov ebx, dword [ebp + 0x1c]
mov edx, dword [esp + 0x10]
mov esi, dword [ebp + 0x18]
xor eax, eax
cmp eax, ebx
jb 0x1013feac
ja 0x1013feae
cmp edx, esi
ja 0x1013feae
mov esi, edx
mov dword [esp + 0x2c], edi
lea edi, [esp + 0x2c]
push edi
mov edi, dword [esp + 0x1c]
xor eax, eax
push 0x200
mov ax, word [ebp + 8]
push edi
mov edi, esi
mov edx, dword [ecx]
sub edi, eax
add eax, ebp
push edi
push eax
mov eax, dword [esp + 0x3c]
push eax
lea eax, [esp + 0x64]
push eax
call dword [edx + 0x14]
test eax, eax
je 0x101402aa
push 0x400
mov dword [esp + 0x24], 0x400
call fcn.10063b18
mov ebx, eax
add esp, 4
test ebx, ebx
mov dword [esp + 0x3c], ebx
je 0x101402c0
mov ecx, dword [esp + 0x20]
xor eax, eax
mov edx, ecx
mov edi, ebx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov edx, dword [esp + 0x18]
and ecx, 3
rep stosb byte es:[edi], al
xor eax, eax
mov ecx, esi
mov ax, word [ebp + 8]
sub ecx, eax
lea eax, [esp + 0x20]
push ecx
push edx
push eax
push ebx
call fcn.101b9090
test eax, eax
jne 0x10140318
cmp dword [esp + 0x20], esi
jne 0x10140318
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x40]
mov esi, dword [esp + 0x98]
push ecx
push edx
push esi
call fcn.10148ab0
add esp, 0xc
test eax, eax
je 0x101402d6
push 0
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x90]
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0
push eax
push ecx
push ebx
push esi
push edx
call fcn.10148bb0
add esp, 0x14
test eax, eax
je 0x101402ec
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
cmp esi, eax
jne 0x10140302
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x48]
xor edx, edx
sub eax, esi
sbb ecx, edx
mov dword [esp + 0x14], 1
mov dword [esp + 0x48], ecx
jne 0x1013ffdb
test eax, eax
jbe 0x10140197
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x18]
cmp eax, edx
jb 0x10140197
ja 0x1013fff3
cmp ecx, esi
jbe 0x10140197
sub ecx, esi
sbb eax, edx
mov ebx, ecx
mov ecx, eax
mov dword [esp + 0x44], ebx
test ecx, ecx
mov dword [esp + 0x48], ecx
ja 0x1014000f
test ebx, ebx
jbe 0x10140197
xor eax, eax
cmp ecx, eax
jb 0x10140023
ja 0x1014001d
cmp ebx, dword [esp + 0x34]
jbe 0x10140023
mov edi, dword [esp + 0x34]
jmp 0x10140025
mov edi, ebx
mov ecx, dword [esp + 0x94]
mov edx, dword [esp + 0x90]
push 0
lea eax, [esp + 0x14]
push 0
push eax
push edi
push ebp
push ecx
push edx
call fcn.10148b60
add esp, 0x1c
test eax, eax
je 0x1014012e
mov esi, dword [esp + 0x10]
test esi, esi
je 0x10140170
cmp esi, edi
jne 0x10140170
xor edi, edi
test esi, esi
jbe 0x101400c1
mov ebx, dword [esp + 0x18]
sub ebx, ebp
sub esi, edi
cmp esi, 0x200
jbe 0x1014007f
mov esi, 0x200
mov ecx, dword [esp + 0x38]
lea eax, [edi + ebp]
mov edx, dword [ecx]
lea ecx, [esp + 0x2c]
push ecx
lea ecx, [ebx + eax]
push esi
push ecx
push esi
push eax
mov eax, dword [esp + 0x3c]
lea ecx, [esp + 0x60]
push eax
push ecx
mov ecx, dword [esp + 0x54]
call dword [edx + 0x14]
test eax, eax
je 0x10140118
cmp dword [esp + 0x2c], esi
jne 0x10140118
mov esi, dword [esp + 0x10]
add edi, 0x200
cmp edi, esi
jb 0x10140070
mov ebx, dword [esp + 0x44]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x98]
lea edx, [esp + 0x1c]
push edx
mov edx, dword [esp + 0x94]
push esi
push eax
push ecx
push edx
call fcn.10148bb0
add esp, 0x14
test eax, eax
je 0x10140144
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x1c]
cmp eax, ecx
jne 0x1014015a
sub ebx, eax
mov eax, dword [esp + 0x48]
sbb eax, 0
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], eax
jne 0x1014010f
test ebx, ebx
jbe 0x10140197
mov ecx, dword [esp + 0x48]
jmp 0x1014000f
mov dword [0x1026e940], 0x12
mov dword [0x1026e944], 0x103e
jmp 0x10140184
mov dword [0x1026e940], 0xd
mov dword [0x1026e944], 0x1029
jmp 0x10140184
mov dword [0x1026e940], 0xe
mov dword [0x1026e944], 0x1048
jmp 0x10140184
mov dword [0x1026e940], 0xe
mov dword [0x1026e944], 0x104f
jmp 0x10140184
mov dword [0x1026e940], 0xd
mov dword [0x1026e944], 0x1030
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x1026e948], eax
mov dword [esp + 0x14], 0
mov eax, dword [esp + 0x98]
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x10140337
mov dword [0x1026e940], 0x1000b
mov dword [0x1026e944], 0xf76
jmp 0x1014032c
mov dword [0x1026e940], 0x21
mov dword [0x1026e944], 0xf7f
jmp 0x1014032c
mov dword [0x1026e940], 0x21
mov dword [0x1026e944], 0xf87
jmp 0x1014032c
mov dword [0x1026e940], 0xd
mov dword [0x1026e944], 0xf94
jmp 0x1014032c
mov dword [0x1026e940], 0xd
mov dword [0x1026e944], 0xf9a
jmp 0x1014032c
mov dword [0x1026e940], 0x1c
mov dword [0x1026e944], 0xfa8
jmp 0x1014032c
mov dword [0x1026e940], 0xd
mov dword [0x1026e944], 0xfae
jmp 0x1014032c
mov dword [0x1026e940], 0x1000b
mov dword [0x1026e944], 0xfb5
jmp 0x1014032c
mov dword [0x1026e940], 0xb
mov dword [0x1026e944], 0xfcd
jmp 0x1014032c
mov dword [0x1026e940], 0xc
mov dword [0x1026e944], 0xfd4
jmp 0x1014032c
mov dword [0x1026e940], 0x12
mov dword [0x1026e944], 0xfe2
jmp 0x1014032c
mov dword [0x1026e940], 0x21
mov dword [0x1026e944], 0xfed
jmp 0x1014032c
mov dword [0x1026e940], 0x25
mov dword [0x1026e944], 0xffd
jmp 0x1014032c
mov dword [0x1026e940], 0xe
mov dword [0x1026e944], 0x100a
jmp 0x1014032c
mov dword [0x1026e940], 0xe
mov dword [0x1026e944], 0x1010
jmp 0x1014032c
mov dword [0x1026e940], 0x1000a
mov dword [0x1026e944], 0xff6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x1026e948], eax
mov ecx, dword [esp + 0x98]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test ebp, ebp
je 0x10140352
push ebp
call fcn.10063b47
add esp, 4
mov eax, dword [esp + 0x3c]
pop edi
pop esi
pop ebp
test eax, eax
pop ebx
je 0x10140367
push eax
call fcn.10063b47
add esp, 4
mov eax, dword [esp + 8]
test eax, eax
je 0x10140378
push eax
call fcn.10063b47
add esp, 4
mov eax, dword [esp + 4]
add esp, 0x7c
ret