Function at 0x46fac8
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0x71
push 0
push 0
dec ecx
jne 0x46fad1
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
call fcn.00404698
mov eax, dword [ebp - 8]
call fcn.00404698
xor eax, eax
push ebp
push 0x470326
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
mov eax, dword [ebp - 4]
call fcn.004046a8
push eax
call sub.kernel32.dll_CreateFileA
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
je 0x470187
mov eax, dword [0x4721e0]
xor edx, edx
mov dword [eax], edx
mov eax, dword [0x4721c0]
mov eax, dword [eax]
mov edx, dword [eax]
call dword [edx + 0x44]
mov eax, dword [0x4721e8]
mov eax, dword [eax]
mov edx, dword [eax]
call dword [edx + 0x44]
push 0
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_GetFileSize
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], 0x100000
mov eax, dword [ebp - 0x14]
push eax
call fcn.00405e44
pop ecx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x1c], 0x100000
mov eax, dword [ebp - 0x1c]
push eax
call fcn.00405e44
pop ecx
mov dword [ebp - 0x28], eax
mov ebx, 0x20
cmp dword [ebp - 0x10], 0x20
jae 0x46fb94
mov ebx, dword [ebp - 0x10]
push 0
push 0
mov eax, dword [ebp - 0x10]
sub eax, ebx
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_SetFilePointer
mov esi, dword [ebp - 0x24]
mov eax, esi
xor ecx, ecx
mov edx, dword [ebp - 0x14]
call fcn.00402d48
push 0
lea eax, [ebp - 0x18]
push eax
push ebx
push esi
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_ReadFile
lea eax, [ebp - 0x34]
call fcn.004041e8
xor eax, eax
mov dword [ebp - 0x2c], eax
mov esi, ebx
xor edi, edi
test esi, esi
jbe 0x46fc17
inc edi
dec esi
mov eax, dword [ebp - 0x24]
mov bl, byte [eax + esi]
xor eax, eax
mov al, bl
cmp eax, 0x30
jl 0x46fc17
cmp eax, 0x39
jg 0x46fc17
lea eax, [ebp - 0x270]
mov edx, ebx
call fcn.004043d0
mov edx, dword [ebp - 0x270]
lea eax, [ebp - 0x34]
mov ecx, dword [ebp - 0x34]
call fcn.004044f4
inc dword [ebp - 0x2c]
test esi, esi
ja 0x46fbdc
xor esi, esi
lea eax, [ebp - 0x44]
call fcn.004041e8
xor eax, eax
mov dword [ebp - 0x30], eax
xor eax, eax
cmp dword [ebp - 0x2c], 0
jle 0x46fc36
mov eax, dword [ebp - 0x34]
call fcn.004088dc
test eax, eax
jbe 0x46fd4c
lea edx, [edi + eax]
cmp edx, dword [ebp - 0x10]
jae 0x46fd4c
mov ebx, eax
push 0
push 0
mov eax, dword [ebp - 0x10]
sub eax, ebx
sub eax, edi
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_SetFilePointer
mov eax, dword [ebp - 0x24]
xor ecx, ecx
mov edx, dword [ebp - 0x14]
call fcn.00402d48
push 0
lea eax, [ebp - 0x18]
push eax
push ebx
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_ReadFile
mov eax, dword [ebp - 0x28]
xor ecx, ecx
mov edx, dword [ebp - 0x1c]
call fcn.00402d48
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x28]
push eax
push ebx
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [0x47259c]
mov eax, dword [eax]
call eax
cmp dword [ebp - 0x20], 0
jbe 0x46fccd
lea eax, [ebp - 0x274]
mov edx, dword [ebp - 0x28]
call fcn.004043e0
mov eax, dword [ebp - 0x274]
lea edx, [ebp - 0x44]
call fcn.00408500
mov eax, dword [ebp - 0x44]
call fcn.004044a8
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x38]
mov edx, 0x470340
call fcn.00404280
mov eax, dword [ebp - 0x38]
call fcn.004044a8
mov ebx, eax
cmp ebx, dword [ebp - 0x30]
jge 0x46fd4c
mov eax, dword [ebp - 0x24]
xor ecx, ecx
mov edx, dword [ebp - 0x14]
call fcn.00402d48
mov eax, dword [ebp - 0x44]
call fcn.004046a8
mov edx, eax
mov eax, dword [ebp - 0x30]
sub eax, ebx
add edx, eax
mov ecx, ebx
mov eax, dword [ebp - 0x24]
call fcn.00408f44
lea eax, [ebp - 0x38]
mov edx, dword [ebp - 0x24]
call fcn.004043e0
lea eax, [ebp - 0x278]
mov edx, dword [ebp - 0x24]
call fcn.004043e0
mov edx, dword [ebp - 0x278]
mov eax, 0x470340
call fcn.004083cc
test al, al
je 0x46fd4c
or esi, 0xffffffff
test esi, esi
je 0x47016a
lea eax, [ebp - 0x6a]
xor ecx, ecx
mov edx, 0x21
call fcn.00402d48
lea eax, [ebp - 0x6a]
push eax
mov eax, dword [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x44]
call fcn.004046a8
push eax
mov eax, dword [0x472180]
mov eax, dword [eax]
call eax
lea eax, [ebp - 0x27c]
lea edx, [ebp - 0x6a]
mov ecx, 0x22
call fcn.00404458
mov ecx, dword [ebp - 0x27c]
mov eax, dword [0x4725ac]
mov edx, dword [ebp - 8]
call fcn.004044f4
mov edx, dword [0x4725ac]
mov edx, dword [edx]
lea eax, [ebp - 8]
mov ecx, 0x470354
call fcn.004044f4
mov eax, dword [ebp - 8]
call fcn.0045c360
mov ecx, dword [0x472438]
mov ecx, dword [ecx]
mov dl, 1
mov eax, dword [0x4674ac]
call fcn.0046bbe0
mov ebx, eax
mov dl, 1
mov eax, dword [0x416a80]
call fcn.00403304
mov esi, eax
mov eax, dword [ebp - 0x44]
call fcn.004046a8
mov edx, eax
mov ecx, dword [ebp - 0x30]
mov eax, esi
mov edi, dword [eax]
call dword [edi + 0x10]
xor ecx, ecx
mov edx, esi
mov eax, ebx
call fcn.0046c980
mov edx, 0x47035c
mov eax, ebx
call fcn.0046e508
mov dl, 1
mov eax, ebx
mov ecx, dword [eax]
call dword [ecx + 0x34]
mov eax, esi
call fcn.00403334
lea edx, [ebp - 0x2a0]
mov eax, ebx
call fcn.0046d688
mov eax, dword [ebp - 0x2a0]
lea edx, [ebp - 0x29c]
mov ecx, dword [eax]
call dword [ecx + 0x14]
mov eax, dword [ebp - 0x29c]
push eax
lea eax, [ebp - 0x2b0]
mov edx, 0x470370
call fcn.00413bb0
lea edx, [ebp - 0x2b0]
lea ecx, [ebp - 0x298]
pop eax
mov esi, dword [eax]
call dword [esi + 0x10]
mov eax, dword [ebp - 0x298]
lea edx, [ebp - 0x294]
mov ecx, dword [eax]
call dword [ecx + 0x3c]
lea edx, [ebp - 0x294]
lea eax, [ebp - 0x284]
call fcn.00412a28
mov eax, dword [ebp - 0x284]
lea edx, [ebp - 0x280]
call fcn.0045c610
mov edx, dword [ebp - 0x280]
mov eax, dword [0x4721a8]
call fcn.0040423c
lea edx, [ebp - 0x2d4]
mov eax, ebx
call fcn.0046d688
mov eax, dword [ebp - 0x2d4]
lea edx, [ebp - 0x2d0]
mov ecx, dword [eax]
call dword [ecx + 0x14]
mov eax, dword [ebp - 0x2d0]
push eax
lea eax, [ebp - 0x2e4]
mov edx, 0x470388
call fcn.00413bb0
lea edx, [ebp - 0x2e4]
lea ecx, [ebp - 0x2cc]
pop eax
mov esi, dword [eax]
call dword [esi + 0x10]
mov eax, dword [ebp - 0x2cc]
lea edx, [ebp - 0x2c8]
mov ecx, dword [eax]
call dword [ecx + 0x3c]
lea edx, [ebp - 0x2c8]
lea eax, [ebp - 0x2b8]
call fcn.00412a28
mov eax, dword [ebp - 0x2b8]
lea edx, [ebp - 0x2b4]
call fcn.0045c610
mov edx, dword [ebp - 0x2b4]
mov eax, dword [0x4723a0]
call fcn.0040423c
lea edx, [ebp - 0x2ec]
mov eax, ebx
call fcn.0046d688
mov eax, dword [ebp - 0x2ec]
lea edx, [ebp - 0x2e8]
mov ecx, dword [eax]
call dword [ecx + 0x14]
mov eax, dword [ebp - 0x2e8]
push eax
lea eax, [ebp - 0x2fc]
mov edx, 0x47039c
call fcn.00413bb0
lea edx, [ebp - 0x2fc]
lea ecx, [ebp - 0x48]
pop eax
mov esi, dword [eax]
call dword [esi + 0x10]
cmp dword [ebp - 0x48], 0
je 0x470163
lea eax, [ebp - 0x26b]
xor ecx, ecx
mov edx, 0x200
call fcn.00402d48
lea edx, [ebp - 0x318]
mov eax, dword [ebp - 0x48]
mov ecx, dword [eax]
call dword [ecx + 0x14]
mov eax, dword [ebp - 0x318]
push eax
lea eax, [ebp - 0x328]
mov edx, 0x4703b0
call fcn.00413bb0
lea edx, [ebp - 0x328]
lea ecx, [ebp - 0x314]
pop eax
mov esi, dword [eax]
call dword [esi + 0x10]
mov eax, dword [ebp - 0x314]
lea edx, [ebp - 0x310]
mov ecx, dword [eax]
call dword [ecx + 0x3c]
lea edx, [ebp - 0x310]
lea eax, [ebp - 0x300]
call fcn.00412a28
mov eax, dword [ebp - 0x300]
lea edx, [ebp - 0x26b]
mov ecx, 0x200
call fcn.0045c4e8
lea edx, [ebp - 0x344]
mov eax, dword [ebp - 0x48]
mov ecx, dword [eax]
call dword [ecx + 0x14]
mov eax, dword [ebp - 0x344]
push eax
lea eax, [ebp - 0x354]
mov edx, 0x4703c4
call fcn.00413bb0
lea edx, [ebp - 0x354]
lea ecx, [ebp - 0x340]
pop eax
mov esi, dword [eax]
call dword [esi + 0x10]
mov eax, dword [ebp - 0x340]
lea edx, [ebp - 0x33c]
mov ecx, dword [eax]
call dword [ecx + 0x3c]
lea edx, [ebp - 0x33c]
lea eax, [ebp - 0x32c]
call fcn.00412a28
mov eax, dword [ebp - 0x32c]
lea edx, [ebp - 0x3c]
call fcn.0045c610
lea edx, [ebp - 0x370]
mov eax, dword [ebp - 0x48]
mov ecx, dword [eax]
call dword [ecx + 0x14]
mov eax, dword [ebp - 0x370]
push eax
lea eax, [ebp - 0x380]
mov edx, 0x4703d4
call fcn.00413bb0
lea edx, [ebp - 0x380]
lea ecx, [ebp - 0x36c]
pop eax
mov esi, dword [eax]
call dword [esi + 0x10]
mov eax, dword [ebp - 0x36c]
lea edx, [ebp - 0x368]
mov ecx, dword [eax]
call dword [ecx + 0x3c]
lea edx, [ebp - 0x368]
lea eax, [ebp - 0x358]
call fcn.00412a28
mov eax, dword [ebp - 0x358]
lea edx, [ebp - 0x40]
call fcn.0045c610
mov edx, dword [0x4721c0]
mov eax, dword [ebp - 0x3c]
call fcn.0045c428
test eax, eax
jne 0x4700f1
mov eax, dword [0x4721c0]
mov eax, dword [eax]
mov edx, dword [ebp - 0x3c]
mov ecx, dword [eax]
call dword [ecx + 0x38]
push dword [ebp - 0x3c]
push 0x4703e8
push dword [ebp - 0x40]
lea eax, [ebp - 0x388]
lea edx, [ebp - 0x26b]
mov ecx, 0x201
call fcn.00404458
push dword [ebp - 0x388]
lea eax, [ebp - 0x384]
mov edx, 4
call fcn.00404568
mov edx, dword [ebp - 0x384]
mov eax, dword [0x4721e8]
mov eax, dword [eax]
mov ecx, dword [eax]
call dword [ecx + 0x38]
lea edx, [ebp - 0x38c]
mov eax, dword [ebp - 0x48]
mov ecx, dword [eax]
call dword [ecx + 0x90]
mov edx, dword [ebp - 0x38c]
lea eax, [ebp - 0x48]
call fcn.00405d30
cmp dword [ebp - 0x48], 0
jne 0x46ff81
mov eax, ebx
call fcn.00403334
mov eax, dword [ebp - 0x28]
push eax
call fcn.00405e54
pop ecx
mov eax, dword [ebp - 0x24]
push eax
call fcn.00405e54
pop ecx
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_CloseHandle
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x470330
lea eax, [ebp - 0x38c]
call fcn.00405d18
lea eax, [ebp - 0x388]
mov edx, 2
call fcn.0040420c
lea eax, [ebp - 0x380]
call fcn.0040f74c
lea eax, [ebp - 0x370]
call fcn.00405d18
lea eax, [ebp - 0x36c]
call fcn.00405d18
lea eax, [ebp - 0x368]
call fcn.0040f74c
lea eax, [ebp - 0x358]
call fcn.004041e8
lea eax, [ebp - 0x354]
call fcn.0040f74c
lea eax, [ebp - 0x344]
call fcn.00405d18
lea eax, [ebp - 0x340]
call fcn.00405d18
lea eax, [ebp - 0x33c]
call fcn.0040f74c
lea eax, [ebp - 0x32c]
call fcn.004041e8
lea eax, [ebp - 0x328]
call fcn.0040f74c
lea eax, [ebp - 0x318]
call fcn.00405d18
lea eax, [ebp - 0x314]
call fcn.00405d18
lea eax, [ebp - 0x310]
call fcn.0040f74c
lea eax, [ebp - 0x300]
call fcn.004041e8
lea eax, [ebp - 0x2fc]
call fcn.0040f74c
lea eax, [ebp - 0x2ec]
call fcn.00405d18
lea eax, [ebp - 0x2e8]
call fcn.00405d18
lea eax, [ebp - 0x2e4]
call fcn.0040f74c
lea eax, [ebp - 0x2d4]
call fcn.00405d18
lea eax, [ebp - 0x2d0]
call fcn.00405d18
lea eax, [ebp - 0x2cc]
call fcn.00405d18
lea eax, [ebp - 0x2c8]
call fcn.0040f74c
lea eax, [ebp - 0x2b8]
mov edx, 2
call fcn.0040420c
lea eax, [ebp - 0x2b0]
call fcn.0040f74c
lea eax, [ebp - 0x2a0]
call fcn.00405d18
lea eax, [ebp - 0x29c]
call fcn.00405d18
lea eax, [ebp - 0x298]
call fcn.00405d18
lea eax, [ebp - 0x294]
call fcn.0040f74c
lea eax, [ebp - 0x284]
mov edx, 6
call fcn.0040420c
lea eax, [ebp - 0x48]
call fcn.00405d18
lea eax, [ebp - 0x44]
mov edx, 5
call fcn.0040420c
lea eax, [ebp - 8]
mov edx, 2
call fcn.0040420c
ret