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

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x7c
push 0
push 0
dec ecx
jne 0x407648
push ecx
push ebx
push esi
push edi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00402a4c
lea eax, [ebp - 0x348]
mov edx, dword [0x403c74]
call fcn.00402cb4
xor eax, eax
push ebp
push 0x407de9
push dword fs:[eax]
mov dword fs:[eax], esp
lea edx, [ebp - 0x10]
xor eax, eax
call fcn.004049bc
mov edx, dword [ebp - 4]
mov eax, 0x407e00
call fcn.00402b9c
mov esi, eax
test si, si
jbe 0x40770a
lea eax, [ebp - 0x350]
push eax
movzx edx, si
inc edx
mov ecx, 2
mov eax, dword [ebp - 4]
call fcn.00402ab8
mov ecx, dword [ebp - 0x350]
lea eax, [ebp - 0x34c]
mov edx, 0x407e0c
call fcn.004028b0
mov eax, dword [ebp - 0x34c]
xor edx, edx
call fcn.00403e24
mov ebx, eax
movzx edi, si
mov edx, edi
lea eax, [ebp - 4]
mov ecx, 3
call fcn.00402af8
lea eax, [ebp - 0x354]
mov edx, ebx
call fcn.004027a0
mov eax, dword [ebp - 0x354]
mov ecx, edi
lea edx, [ebp - 4]
call fcn.00402b40
test si, si
jne 0x40768a
lea eax, [ebp - 0x1c]
call fcn.004025c4
lea eax, [ebp - 0x18]
call fcn.004025c4
lea edx, [ebp - 0x20]
mov eax, dword [ebp - 4]
call fcn.00407528
mov eax, dword [ebp - 0x20]
call fcn.00402864
mov edx, dword [ebp - 0x20]
cmp byte [edx + eax - 1], 0x5c
jne 0x407aea
lea eax, [ebp - 0x358]
call fcn.0040740c
lea eax, [ebp - 0x358]
push eax
lea edx, [ebp - 0x35c]
mov ax, 0x50
call fcn.00404d00
mov edx, dword [ebp - 0x35c]
pop eax
call fcn.0040286c
mov edx, dword [ebp - 0x358]
lea eax, [ebp - 0x1f0]
call fcn.0040186c
lea eax, [ebp - 0x1f0]
call fcn.00401608
call fcn.004012c8
lea edx, [ebp - 0x360]
mov ax, 0x51
call fcn.00404d00
mov edx, dword [ebp - 0x360]
lea eax, [ebp - 0x1f0]
call fcn.00402c48
call fcn.00401ec0
call fcn.004012c8
lea edx, [ebp - 0x364]
mov ax, 0x52
call fcn.00404d00
mov edx, dword [ebp - 0x364]
lea eax, [ebp - 0x1f0]
call fcn.00402c48
call fcn.00401ec0
call fcn.004012c8
lea edx, [ebp - 0x368]
mov ax, 0x53
call fcn.00404d00
mov edx, dword [ebp - 0x368]
lea eax, [ebp - 0x1f0]
call fcn.00402c48
call fcn.00401ec0
call fcn.004012c8
lea edx, [ebp - 0x36c]
mov ax, 0x54
call fcn.00404d00
mov edx, dword [ebp - 0x36c]
lea eax, [ebp - 0x1f0]
call fcn.00402c48
call fcn.00401ec0
call fcn.004012c8
lea edx, [ebp - 0x370]
mov ax, 0x55
call fcn.00404d00
mov edx, dword [ebp - 0x370]
lea eax, [ebp - 0x1f0]
call fcn.00402c48
call fcn.00401ec0
call fcn.004012c8
lea edx, [ebp - 0x378]
mov ax, 0x56
call fcn.00404d00
push dword [ebp - 0x378]
push dword [ebp - 0x10]
push 0x407e18
push dword [0x412e38]
lea edx, [ebp - 0x37c]
mov ax, 0x5a
call fcn.00404d00
push dword [ebp - 0x37c]
lea eax, [ebp - 0x374]
mov edx, 5
call fcn.00402924
mov edx, dword [ebp - 0x374]
lea eax, [ebp - 0x1f0]
call fcn.00402c48
call fcn.00401ec0
call fcn.004012c8
lea edx, [ebp - 0x384]
mov ax, 0x2c
call fcn.00404d00
push dword [ebp - 0x384]
push dword [ebp - 0x10]
push 0x407e18
push dword [0x412e38]
lea edx, [ebp - 0x388]
mov ax, 0x2b
call fcn.00404d00
push dword [ebp - 0x388]
lea eax, [ebp - 0x380]
mov edx, 5
call fcn.00402924
mov edx, dword [ebp - 0x380]
lea eax, [ebp - 0x1f0]
call fcn.00402c48
call fcn.00401ec0
call fcn.004012c8
mov edx, 0x407e24
lea eax, [ebp - 0x1f0]
call fcn.00402c48
call fcn.00401ec0
call fcn.004012c8
lea eax, [ebp - 0x38c]
mov ecx, 0x407e34
mov edx, dword [ebp - 0x20]
call fcn.004028b0
mov eax, dword [ebp - 0x38c]
lea ecx, [ebp - 0x348]
mov edx, 0x3f
call fcn.0040409c
mov ebx, eax
lea eax, [ebp - 0x14]
mov edx, dword [ebp - 4]
call fcn.0040265c
mov eax, dword [ebp - 0x14]
cmp byte [eax], 0x2f
jne 0x407994
lea eax, [ebp - 0x14]
mov ecx, 1
mov edx, 1
call fcn.00402af8
test ebx, ebx
jne 0x407ada
test dword [ebp - 0x340], 0x10
jle 0x407a2d
lea edx, [ebp - 0x394]
mov ax, 0x5d
call fcn.00404d00
push dword [ebp - 0x394]
push dword [ebp - 0x10]
push 0x407e18
push dword [0x412e38]
push 0x407e40
push dword [ebp - 0x14]
push dword [ebp - 0x33c]
push 0x407e4c
push dword [ebp - 0x33c]
lea edx, [ebp - 0x398]
mov ax, 0x62
call fcn.00404d00
push dword [ebp - 0x398]
lea eax, [ebp - 0x390]
mov edx, 0xa
call fcn.00402924
mov edx, dword [ebp - 0x390]
lea eax, [ebp - 0x1f0]
call fcn.00402c48
call fcn.00401ec0
call fcn.004012c8
jmp 0x407ac5
lea edx, [ebp - 0x3a0]
mov ax, 0x6d
call fcn.00404d00
push dword [ebp - 0x3a0]
push dword [ebp - 0x10]
push 0x407e18
push dword [0x412e38]
push 0x407e40
push dword [ebp - 0x14]
push dword [ebp - 0x33c]
push 0x407e58
push dword [ebp - 0x33c]
push 0x407e64
lea edx, [ebp - 0x3a4]
mov eax, dword [ebp - 0x344]
call fcn.00403da0
push dword [ebp - 0x3a4]
lea edx, [ebp - 0x3a8]
mov ax, 0x1c
call fcn.00404d00
push dword [ebp - 0x3a8]
lea eax, [ebp - 0x39c]
mov edx, 0xc
call fcn.00402924
mov edx, dword [ebp - 0x39c]
lea eax, [ebp - 0x1f0]
call fcn.00402c48
call fcn.00401ec0
call fcn.004012c8
lea eax, [ebp - 0x348]
call fcn.004040ec
mov ebx, eax
test ebx, ebx
je 0x40799c
lea eax, [ebp - 0x1f0]
call fcn.00401a04
call fcn.004012c8
lea ecx, [ebp - 0x3ac]
mov edx, dword [ebp - 4]
mov eax, 0x407e40
call fcn.0040749c
mov edx, dword [ebp - 0x3ac]
lea eax, [ebp - 4]
call fcn.0040265c
cmp dword [ebp - 4], 0
jne 0x407b1f
lea edx, [ebp - 4]
mov ax, 0x50
call fcn.00404d00
jmp 0x407b2a
lea eax, [ebp - 4]
mov edx, dword [ebp - 0x20]
call fcn.0040265c
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [0x411218]
mov eax, dword [eax]
call eax
test eax, eax
jne 0x407b4b
mov eax, dword [ebp - 0x20]
call fcn.00404b30
test al, al
je 0x407da5
lea edx, [ebp - 0x3b0]
mov ax, 0x50
call fcn.00404d00
mov eax, dword [ebp - 0x3b0]
mov edx, dword [ebp - 4]
call fcn.00402b9c
test eax, eax
jle 0x407ba7
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
lea eax, [ebp - 0x3b4]
mov ecx, dword [ebp - 4]
mov edx, dword [0x412e48]
call fcn.004028b0
mov eax, dword [ebp - 0x3b4]
call fcn.00402a5c
push eax
call sub.KERNEL32.DLL_CreateFileA
mov ebx, eax
jmp 0x407bc9
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
mov eax, dword [ebp - 4]
call fcn.00402a5c
push eax
call sub.KERNEL32.DLL_CreateFileA
mov ebx, eax
push 0
push ebx
call sub.KERNEL32.DLL_GetFileSize
mov esi, eax
lea ecx, [ebp - 0x3b8]
mov edx, dword [ebp - 4]
mov eax, 0x407e74
call fcn.0040749c
mov eax, dword [ebp - 0x3b8]
push eax
lea edx, [ebp - 0x3bc]
mov ax, 0x6b
call fcn.00404d00
mov edx, dword [ebp - 0x3bc]
pop eax
call fcn.004029a8
je 0x407c41
lea ecx, [ebp - 0x3c0]
mov edx, dword [ebp - 4]
mov eax, 0x407e74
call fcn.0040749c
mov eax, dword [ebp - 0x3c0]
push eax
lea edx, [ebp - 0x3c4]
mov ax, 0x6c
call fcn.00404d00
mov edx, dword [ebp - 0x3c4]
pop eax
call fcn.004029a8
jne 0x407c4d
lea edx, [ebp - 0x18]
mov ax, 0x75
call fcn.00404d00
lea edx, [ebp - 0x3c8]
mov ax, 0x6e
call fcn.00404d00
push dword [ebp - 0x3c8]
mov eax, dword [0x411254]
push dword [eax]
lea edx, [ebp - 0x3cc]
mov ax, 0x6f
call fcn.00404d00
push dword [ebp - 0x3cc]
mov eax, dword [0x411254]
push dword [eax]
lea edx, [ebp - 0x3d0]
mov ax, 0x70
call fcn.00404d00
push dword [ebp - 0x3d0]
lea edx, [ebp - 0x3d4]
mov eax, esi
call fcn.00403da0
push dword [ebp - 0x3d4]
mov eax, dword [0x411254]
push dword [eax]
lea edx, [ebp - 0x3d8]
mov ax, 0x71
call fcn.00404d00
push dword [ebp - 0x3d8]
push 0x407e80
lea edx, [ebp - 0x3dc]
mov ax, 0x72
call fcn.00404d00
push dword [ebp - 0x3dc]
mov eax, dword [0x411254]
push dword [eax]
lea edx, [ebp - 0x3e0]
mov ax, 0x73
call fcn.00404d00
push dword [ebp - 0x3e0]
mov eax, dword [0x411254]
push dword [eax]
lea edx, [ebp - 0x3e4]
mov ax, 0x74
call fcn.00404d00
push dword [ebp - 0x3e4]
push dword [ebp - 0x18]
mov eax, dword [0x411254]
push dword [eax]
mov eax, dword [0x411254]
push dword [eax]
lea eax, [ebp - 0x1c]
mov edx, 0x11
call fcn.00402924
lea eax, [ebp - 0xc]
mov edx, 0x1394
call fcn.00402be4
mov eax, dword [ebp - 0x1c]
call fcn.00402864
push eax
lea eax, [ebp - 0x1c]
call fcn.00402ab0
mov edx, eax
mov eax, dword [ebp - 8]
pop ecx
call fcn.00407324
push 0
lea eax, [ebp - 0x24]
push eax
push 0x1394
lea eax, [ebp - 0xc]
call fcn.00402ab0
push eax
push ebx
call sub.KERNEL32.DLL_ReadFile
lea eax, [ebp - 0xc]
call fcn.00402ab0
mov edx, eax
mov cx, 0x1394
mov eax, dword [ebp - 8]
call fcn.00407324
cmp dword [ebp - 0x24], 0x1394
jae 0x407d62
push ebx
mov eax, dword [0x41120c]
mov eax, dword [eax]
call eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x407df0
lea eax, [ebp - 0x3e4]
mov edx, 0x27
call fcn.004025e8
lea eax, [ebp - 0x348]
mov edx, dword [0x403c74]
call fcn.00402d78
lea eax, [ebp - 0x20]
mov edx, 6
call fcn.004025e8
lea eax, [ebp - 4]
call fcn.004025c4
ret