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

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0x77
push 0
push 0
dec ecx
jne 0x470059
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 0x47096c
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 0x47078b
mov eax, dword [0x4731e8]
xor edx, edx
mov dword [eax], edx
mov eax, dword [0x4731c8]
mov eax, dword [eax]
mov edx, dword [eax]
call dword [edx + 0x44]
mov eax, dword [0x4731f0]
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 0x47011c
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 0x47019f
inc edi
dec esi
mov eax, dword [ebp - 0x24]
mov bl, byte [eax + esi]
xor eax, eax
mov al, bl
cmp eax, 0x30
jl 0x47019f
cmp eax, 0x39
jg 0x47019f
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 0x470164
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 0x4701be
mov eax, dword [ebp - 0x34]
call fcn.004088dc
test eax, eax
jbe 0x4702d4
lea edx, [edi + eax]
cmp edx, dword [ebp - 0x10]
jae 0x4702d4
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 [0x4735c8]
mov eax, dword [eax]
call eax
cmp dword [ebp - 0x20], 0
jbe 0x470255
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, 0x470988
call fcn.00404280
mov eax, dword [ebp - 0x38]
call fcn.004044a8
mov ebx, eax
cmp ebx, dword [ebp - 0x30]
jge 0x4702d4
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, 0x470988
call fcn.004083cc
test al, al
je 0x4702d4
or esi, 0xffffffff
test esi, esi
je 0x47076e
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 [0x473188]
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 [0x4735d8]
mov edx, dword [ebp - 8]
call fcn.004044f4
mov edx, dword [0x4735d8]
mov edx, dword [edx]
lea eax, [ebp - 8]
mov ecx, 0x47099c
call fcn.004044f4
mov eax, dword [ebp - 8]
call fcn.0045c360
mov ecx, dword [0x47345c]
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, 0x4709a4
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, 0x4709b8
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 [0x4731b0]
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, 0x4709d0
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 [0x4733b8]
call fcn.0040423c
lea edx, [ebp - 0x304]
mov eax, ebx
call fcn.0046d688
mov eax, dword [ebp - 0x304]
lea edx, [ebp - 0x300]
mov ecx, dword [eax]
call dword [ecx + 0x14]
mov eax, dword [ebp - 0x300]
push eax
lea eax, [ebp - 0x314]
mov edx, 0x4709e4
call fcn.00413bb0
lea edx, [ebp - 0x314]
lea ecx, [ebp - 0x2fc]
pop eax
mov esi, dword [eax]
call dword [esi + 0x10]
mov eax, dword [ebp - 0x2fc]
lea edx, [ebp - 0x2f8]
mov ecx, dword [eax]
call dword [ecx + 0x3c]
lea edx, [ebp - 0x2f8]
lea eax, [ebp - 0x2e8]
call fcn.00412a28
mov eax, dword [ebp - 0x2e8]
call fcn.004088dc
mov edx, dword [0x473430]
mov dword [edx], eax
lea edx, [ebp - 0x31c]
mov eax, ebx
call fcn.0046d688
mov eax, dword [ebp - 0x31c]
lea edx, [ebp - 0x318]
mov ecx, dword [eax]
call dword [ecx + 0x14]
mov eax, dword [ebp - 0x318]
push eax
lea eax, [ebp - 0x32c]
mov edx, 0x4709f4
call fcn.00413bb0
lea edx, [ebp - 0x32c]
lea ecx, [ebp - 0x48]
pop eax
mov esi, dword [eax]
call dword [esi + 0x10]
cmp dword [ebp - 0x48], 0
je 0x470767
lea eax, [ebp - 0x26b]
xor ecx, ecx
mov edx, 0x200
call fcn.00402d48
lea edx, [ebp - 0x348]
mov eax, dword [ebp - 0x48]
mov ecx, dword [eax]
call dword [ecx + 0x14]
mov eax, dword [ebp - 0x348]
push eax
lea eax, [ebp - 0x358]
mov edx, 0x470a08
call fcn.00413bb0
lea edx, [ebp - 0x358]
lea ecx, [ebp - 0x344]
pop eax
mov esi, dword [eax]
call dword [esi + 0x10]
mov eax, dword [ebp - 0x344]
lea edx, [ebp - 0x340]
mov ecx, dword [eax]
call dword [ecx + 0x3c]
lea edx, [ebp - 0x340]
lea eax, [ebp - 0x330]
call fcn.00412a28
mov eax, dword [ebp - 0x330]
lea edx, [ebp - 0x26b]
mov ecx, 0x200
call fcn.0045c4e8
lea edx, [ebp - 0x374]
mov eax, dword [ebp - 0x48]
mov ecx, dword [eax]
call dword [ecx + 0x14]
mov eax, dword [ebp - 0x374]
push eax
lea eax, [ebp - 0x384]
mov edx, 0x470a1c
call fcn.00413bb0
lea edx, [ebp - 0x384]
lea ecx, [ebp - 0x370]
pop eax
mov esi, dword [eax]
call dword [esi + 0x10]
mov eax, dword [ebp - 0x370]
lea edx, [ebp - 0x36c]
mov ecx, dword [eax]
call dword [ecx + 0x3c]
lea edx, [ebp - 0x36c]
lea eax, [ebp - 0x35c]
call fcn.00412a28
mov eax, dword [ebp - 0x35c]
lea edx, [ebp - 0x3c]
call fcn.0045c610
lea edx, [ebp - 0x3a0]
mov eax, dword [ebp - 0x48]
mov ecx, dword [eax]
call dword [ecx + 0x14]
mov eax, dword [ebp - 0x3a0]
push eax
lea eax, [ebp - 0x3b0]
mov edx, 0x470a2c
call fcn.00413bb0
lea edx, [ebp - 0x3b0]
lea ecx, [ebp - 0x39c]
pop eax
mov esi, dword [eax]
call dword [esi + 0x10]
mov eax, dword [ebp - 0x39c]
lea edx, [ebp - 0x398]
mov ecx, dword [eax]
call dword [ecx + 0x3c]
lea edx, [ebp - 0x398]
lea eax, [ebp - 0x388]
call fcn.00412a28
mov eax, dword [ebp - 0x388]
lea edx, [ebp - 0x40]
call fcn.0045c610
mov edx, dword [0x4731c8]
mov eax, dword [ebp - 0x3c]
call fcn.0045c428
test eax, eax
jne 0x4706f5
mov eax, dword [0x4731c8]
mov eax, dword [eax]
mov edx, dword [ebp - 0x3c]
mov ecx, dword [eax]
call dword [ecx + 0x38]
push dword [ebp - 0x3c]
push 0x470a40
push dword [ebp - 0x40]
lea eax, [ebp - 0x3b8]
lea edx, [ebp - 0x26b]
mov ecx, 0x201
call fcn.00404458
push dword [ebp - 0x3b8]
lea eax, [ebp - 0x3b4]
mov edx, 4
call fcn.00404568
mov edx, dword [ebp - 0x3b4]
mov eax, dword [0x4731f0]
mov eax, dword [eax]
mov ecx, dword [eax]
call dword [ecx + 0x38]
lea edx, [ebp - 0x3bc]
mov eax, dword [ebp - 0x48]
mov ecx, dword [eax]
call dword [ecx + 0x90]
mov edx, dword [ebp - 0x3bc]
lea eax, [ebp - 0x48]
call fcn.00405d30
cmp dword [ebp - 0x48], 0
jne 0x470585
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 0x470976
lea eax, [ebp - 0x3bc]
call fcn.00405d18
lea eax, [ebp - 0x3b8]
mov edx, 2
call fcn.0040420c
lea eax, [ebp - 0x3b0]
call fcn.0040f74c
lea eax, [ebp - 0x3a0]
call fcn.00405d18
lea eax, [ebp - 0x39c]
call fcn.00405d18
lea eax, [ebp - 0x398]
call fcn.0040f74c
lea eax, [ebp - 0x388]
call fcn.004041e8
lea eax, [ebp - 0x384]
call fcn.0040f74c
lea eax, [ebp - 0x374]
call fcn.00405d18
lea eax, [ebp - 0x370]
call fcn.00405d18
lea eax, [ebp - 0x36c]
call fcn.0040f74c
lea eax, [ebp - 0x35c]
call fcn.004041e8
lea eax, [ebp - 0x358]
call fcn.0040f74c
lea eax, [ebp - 0x348]
call fcn.00405d18
lea eax, [ebp - 0x344]
call fcn.00405d18
lea eax, [ebp - 0x340]
call fcn.0040f74c
lea eax, [ebp - 0x330]
call fcn.004041e8
lea eax, [ebp - 0x32c]
call fcn.0040f74c
lea eax, [ebp - 0x31c]
call fcn.00405d18
lea eax, [ebp - 0x318]
call fcn.00405d18
lea eax, [ebp - 0x314]
call fcn.0040f74c
lea eax, [ebp - 0x304]
call fcn.00405d18
lea eax, [ebp - 0x300]
call fcn.00405d18
lea eax, [ebp - 0x2fc]
call fcn.00405d18
lea eax, [ebp - 0x2f8]
call fcn.0040f74c
lea eax, [ebp - 0x2e8]
call fcn.004041e8
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