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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1007c649
mov eax, dword fs:[0]
push eax
sub esp, 0x88
mov eax, dword [0x10094610]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x38], eax
xor ebx, ebx
mov dword [ebp - 4], ebx
cmp dword [ebp + 0x10], ebx
je 0x10007739
push 0x1009877c
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x44], ebx
nop
mov ecx, dword [ebp + 0xc]
push 0
push 0x80
push 3
push 0
push 0
push SysReAllocString
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x1000778c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x10007ee8
cmp dword [ebp - 0x48], 0xa
jge 0x10007ee8
inc dword [ebp - 0x48]
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x10007740
lea edx, [ebp - 0x54]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
push 0
push 0
mov edi, eax
push esi
mov dword [ebp - 0x4c], edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test ebx, ebx
je 0x100077b6
push ebx
call fcn.10066c8a
add esp, 4
add edi, 2
push edi
call fcn.1006555b
add esp, 4
push edi
mov ebx, eax
push 0
push ebx
mov dword [ebp - 0x3c], ebx
call fcn.10066c10
mov ecx, dword [ebp - 0x4c]
add esp, 0xc
push 0
lea eax, [ebp - 0x54]
push eax
push ecx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea esp, [esp]
mov esi, dword [ebp - 0x3c]
mov eax, esi
mov dword [ebp - 0x1c], 0xf
mov dword [ebp - 0x20], 0
mov byte [ebp - 0x30], 0
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10007810
sub eax, edx
push eax
push esi
lea ecx, [ebp - 0x30]
call fcn.10004bf0
mov edx, dword [ebp - 0x38]
mov byte [ebp - 4], 1
mov edi, dword [edx + 4]
mov dword [ebp - 0x40], edi
test edi, edi
je 0x10007a04
movsx eax, byte [edi + 8]
cmp eax, 4
je 0x10007997
add eax, 0xfffffffa
cmp eax, 1
ja 0x100079d7
mov ebx, dword [edi]
mov dword [ebp - 0x34], ebx
test ebx, ebx
je 0x100079d7
mov byte [ebp - 4], 2
mov edi, dword [ebx + 4]
mov esi, dword [edi]
cmp esi, esi
jne 0x10007918
cmp edi, edi
jne 0x10007918
mov ebx, dword [edi + 4]
cmp byte [ebx + 0x29], 0
mov esi, ebx
jne 0x100078f9
mov eax, dword [esi + 8]
mov ecx, dword [ebp - 0x34]
push eax
call fcn.1000c141
mov esi, dword [esi]
lea edi, [ebx + 0x10]
mov dword [ebp - 0x50], edi
lea ecx, [edi + 8]
mov byte [ebp - 4], 3
call fcn.1000b698
mov byte [ebp - 4], 2
cmp dword [edi], 0
je 0x100078e8
cmp dword [edi + 4], 1
jne 0x100078e8
test byte [0x10098bc8], 1
jne 0x100078d8
or dword [0x10098bc8], 1
push 0x1007d35b
mov dword [0x10098bc4], 0x100860a4
call fcn.10066db8
add esp, 4
mov ecx, dword [0x10095ae4]
mov edx, dword [ecx]
mov eax, dword [edi]
mov edx, dword [edx + 8]
push eax
call edx
push ebx
call fcn.100660ce
add esp, 4
cmp byte [esi + 0x29], 0
mov ebx, esi
je 0x10007882
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax + 4]
mov dword [ecx + 4], ecx
mov ecx, dword [eax + 4]
mov dword [ecx], ecx
mov ecx, dword [eax + 4]
mov dword [ecx + 8], ecx
mov dword [eax + 8], 0
mov ebx, eax
jmp 0x10007979
cmp esi, edi
je 0x10007979
lea esp, [esp]
cmp byte [esi + 0x29], 0
mov ecx, esi
jne 0x10007967
mov eax, dword [esi + 8]
cmp byte [eax + 0x29], 0
jne 0x1000794c
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0x29], 0
jne 0x10007967
jmp 0x10007940
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0x29], 0
je 0x10007940
jmp 0x10007967
mov eax, dword [esi + 4]
cmp byte [eax + 0x29], 0
jne 0x10007965
cmp esi, dword [eax + 8]
jne 0x10007965
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0x29], 0
je 0x10007955
mov esi, eax
push ecx
lea eax, [ebp - 0x8c]
push eax
push ebx
call fcn.1000bbed
cmp esi, edi
jne 0x10007920
mov byte [ebp - 4], 1
mov eax, dword [ebx + 4]
push eax
call fcn.100660ce
add esp, 4
push ebx
call fcn.100660ce
mov edi, dword [ebp - 0x40]
add esp, 4
jmp 0x100079d7
test dword [edi + 8], 0x100
je 0x100079d7
test byte [0x10098bc8], 1
jne 0x100079c7
or dword [0x10098bc8], 1
push 0x1007d35b
mov dword [0x10098bc4], 0x100860a4
call fcn.10066db8
add esp, 4
mov ecx, dword [0x10095ae4]
mov edx, dword [ecx]
mov eax, dword [edi]
mov edx, dword [edx + 0x10]
push eax
call edx
mov eax, dword [edi + 0xc]
test eax, eax
je 0x100079fb
mov ecx, dword [eax - 4]
lea esi, [eax - 4]
push 0x1000b3e2
push ecx
push 4
push eax
call fcn.10066e2d
push esi
call fcn.10066c8a
add esp, 4
push edi
call fcn.100660ce
add esp, 4
mov edx, dword [ebp - 0x38]
mov edi, dword [edx]
xor ebx, ebx
cmp edi, ebx
je 0x10007ad7
mov esi, 0x10
cmp dword [edi + 0x74], esi
jb 0x10007a29
mov eax, dword [edi + 0x60]
push eax
call fcn.100660ce
add esp, 4
mov dword [edi + 0x74], 0xf
mov dword [edi + 0x70], ebx
mov byte [edi + 0x60], bl
cmp dword [edi + 0x44], esi
jb 0x10007a47
mov eax, dword [edi + 0x30]
push eax
call fcn.100660ce
add esp, 4
mov dword [edi + 0x44], 0xf
mov dword [edi + 0x40], ebx
lea esi, [edi + 0x18]
mov byte [edi + 0x30], bl
call fcn.10008900
mov eax, dword [esi]
push eax
call fcn.100660ce
mov dword [esi], ebx
mov eax, dword [edi + 0x10]
add esp, 4
cmp eax, ebx
je 0x10007a82
cmp eax, ebx
je 0x10007a7d
dec eax
mov dword [edi + 0x10], eax
jne 0x10007a7d
mov dword [edi + 0xc], ebx
cmp dword [edi + 0x10], ebx
jne 0x10007a70
mov esi, dword [edi + 8]
cmp esi, ebx
jbe 0x10007aab
lea esp, [esp]
mov eax, dword [edi + 4]
dec esi
cmp dword [eax + esi*4], ebx
lea eax, [eax + esi*4]
je 0x10007aa7
mov eax, dword [eax]
push eax
call fcn.100660ce
add esp, 4
cmp esi, ebx
ja 0x10007a90
mov eax, dword [edi + 4]
cmp eax, ebx
je 0x10007abb
push eax
call fcn.100660ce
add esp, 4
mov eax, dword [edi]
push eax
mov dword [edi + 8], ebx
mov dword [edi + 4], ebx
call fcn.100660ce
add esp, 4
push edi
mov dword [edi], ebx
call fcn.100660ce
add esp, 4
push 0x80
call fcn.1006610e
mov esi, eax
add esp, 4
mov dword [ebp - 0x50], esi
mov byte [ebp - 4], 4
cmp esi, ebx
je 0x10007b77
push 8
mov dword [esi], ebx
call fcn.1006610e
add esp, 4
cmp eax, ebx
je 0x10007f52
mov dword [esi], eax
xor ecx, ecx
mov dword [eax], ecx
xor edx, edx
mov dword [eax + 4], edx
mov ecx, dword [esi]
mov dword [ecx], esi
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov dword [esi + 0x10], ebx
mov byte [ebp - 4], 5
lea edi, [esi + 0x18]
push 8
mov dword [edi], ebx
call fcn.1006610e
add esp, 4
cmp eax, ebx
je 0x10007f2e
mov dword [edi], eax
mov dword [eax + 4], ebx
xor ecx, ecx
mov dword [eax], ecx
mov edx, dword [edi]
mov dword [edx], edi
mov dword [edi + 4], ebx
mov dword [edi + 8], ebx
mov dword [edi + 0xc], ebx
mov dword [edi + 0x10], ebx
mov dword [esi + 0x40], ebx
mov eax, 0xf
mov dword [esi + 0x44], eax
mov byte [esi + 0x30], cl
mov dword [esi + 0x74], eax
mov dword [esi + 0x70], ebx
mov byte [esi + 0x60], cl
mov word [esi + 0x7c], 1
jmp 0x10007b79
xor esi, esi
mov eax, dword [ebp - 0x38]
mov byte [ebp - 4], 1
push 0x10
mov dword [eax], esi
call fcn.1006610e
add esp, 4
cmp eax, ebx
je 0x10007ba6
mov byte [eax + 8], 0
and dword [eax + 8], 0xfffffeff
mov dword [eax + 0xc], 0
mov ebx, eax
jmp 0x10007ba8
xor ebx, ebx
mov eax, dword [ebp - 0x38]
and dword [ebp - 0x64], 0xfffffe00
mov dword [eax + 4], ebx
mov dword [ebp - 0x60], 0
push 0xffffffffffffffff
mov byte [ebp - 4], 9
mov edi, dword [eax]
push 0
lea ecx, [ebp - 0x30]
lea esi, [edi + 0x30]
push ecx
mov ecx, esi
call fcn.10004830
cmp dword [esi + 0x14], 0x10
jb 0x10007bdc
mov esi, dword [esi]
mov ecx, dword [edi + 0x40]
lea ecx, [ecx + esi]
push esi
mov edx, ebx
call fcn.1000c9c4
test al, al
jne 0x10007ff5
cmp dword [ebp - 0x44], 0xa
jl 0x10007e6f
mov ebx, dword [ebp - 0x38]
mov esi, dword [ebx + 4]
mov dword [ebp - 0x40], esi
test esi, esi
je 0x10007de7
movsx eax, byte [esi + 8]
cmp eax, 4
je 0x10007d77
add eax, 0xfffffffa
cmp eax, 1
ja 0x10007db7
mov edi, dword [esi]
mov dword [ebp - 0x34], edi
test edi, edi
je 0x10007db7
mov byte [ebp - 4], 0xa
mov ebx, dword [edi + 4]
mov esi, dword [ebx]
cmp esi, esi
jne 0x10007cf6
cmp ebx, ebx
jne 0x10007cf6
mov ebx, dword [ebx + 4]
cmp byte [ebx + 0x29], 0
mov esi, ebx
jne 0x10007cd7
jmp 0x10007c60
mov edx, dword [esi + 8]
mov ecx, dword [ebp - 0x34]
push edx
call fcn.1000c141
mov esi, dword [esi]
lea edi, [ebx + 0x10]
mov dword [ebp - 0x50], edi
lea ecx, [edi + 8]
mov byte [ebp - 4], 0xb
call fcn.1000b698
mov byte [ebp - 4], 0xa
cmp dword [edi], 0
je 0x10007cc6
cmp dword [edi + 4], 1
jne 0x10007cc6
test byte [0x10098bc8], 1
jne 0x10007cb6
or dword [0x10098bc8], 1
push 0x1007d35b
mov dword [0x10098bc4], 0x100860a4
call fcn.10066db8
add esp, 4
mov ecx, dword [0x10095ae4]
mov eax, dword [ecx]
mov edx, dword [edi]
mov eax, dword [eax + 8]
push edx
call eax
push ebx
call fcn.100660ce
add esp, 4
cmp byte [esi + 0x29], 0
mov ebx, esi
je 0x10007c60
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax + 4]
mov dword [ecx + 4], ecx
mov ecx, dword [eax + 4]
mov dword [ecx], ecx
mov ecx, dword [eax + 4]
mov dword [ecx + 8], ecx
mov dword [eax + 8], 0
mov edi, eax
jmp 0x10007d56
cmp esi, ebx
je 0x10007d56
lea ebx, [ebx]
cmp byte [esi + 0x29], 0
mov ecx, esi
jne 0x10007d47
mov eax, dword [esi + 8]
cmp byte [eax + 0x29], 0
jne 0x10007d2c
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0x29], 0
jne 0x10007d47
jmp 0x10007d20
mov esi, eax
mov eax, dword [esi]
cmp byte [eax + 0x29], 0
je 0x10007d20
jmp 0x10007d47
mov eax, dword [esi + 4]
cmp byte [eax + 0x29], 0
jne 0x10007d45
cmp esi, dword [eax + 8]
jne 0x10007d45
mov esi, eax
mov eax, dword [eax + 4]
cmp byte [eax + 0x29], 0
je 0x10007d35
mov esi, eax
push ecx
lea ecx, [ebp - 0x7c]
push ecx
push edi
call fcn.1000bbed
cmp esi, ebx
jne 0x10007d00
mov byte [ebp - 4], 9
mov eax, dword [edi + 4]
push eax
call fcn.100660ce
add esp, 4
push edi
call fcn.100660ce
mov ebx, dword [ebp - 0x38]
mov esi, dword [ebp - 0x40]
add esp, 4
jmp 0x10007db7
test dword [esi + 8], 0x100
je 0x10007db7
test byte [0x10098bc8], 1
jne 0x10007da7
or dword [0x10098bc8], 1
push 0x1007d35b
mov dword [0x10098bc4], 0x100860a4
call fcn.10066db8
add esp, 4
mov ecx, dword [0x10095ae4]
mov edx, dword [ecx]
mov eax, dword [esi]
mov edx, dword [edx + 0x10]
push eax
call edx
mov eax, dword [esi + 0xc]
test eax, eax
je 0x10007dde
mov ecx, dword [eax - 4]
lea esi, [eax - 4]
push 0x1000b3e2
push ecx
push 4
push eax
call fcn.10066e2d
push esi
call fcn.10066c8a
mov esi, dword [ebp - 0x40]
add esp, 4
push esi
call fcn.100660ce
add esp, 4
mov edi, dword [ebx]
test edi, edi
je 0x10007dfb
call fcn.100075a0
push edi
call fcn.100660ce
add esp, 4
mov edx, dword [ebp - 0x3c]
push edx
mov dword [ebx], 0
mov dword [ebx + 4], 0
call fcn.10066c8a
add esp, 4
cmp dword [ebx + 8], 0
je 0x10007f7f
mov eax, dword [ebx + 0xc]
lea ecx, [eax - 2]
push eax
mov dword [ebp - 0x4c], ecx
call fcn.1006555b
mov edx, dword [ebx + 0xc]
mov ecx, dword [ebx + 8]
add esp, 4
push edx
push ecx
push eax
mov dword [ebp - 0x3c], eax
call fcn.10065820
add esp, 0xc
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 1
call fcn.1000b698
mov byte [ebp - 4], 0
cmp dword [ebp - 0x1c], 0x10
jb 0x100077f0
mov edx, dword [ebp - 0x30]
push edx
call fcn.100660ce
add esp, 4
jmp 0x100077f0
mov esi, dword [ebp - 0x38]
mov edi, dword [esi + 4]
xor ebx, ebx
cmp edi, ebx
je 0x10007e8b
mov ecx, edi
call fcn.1000b698
push edi
call fcn.100660ce
add esp, 4
mov edi, dword [esi]
cmp edi, ebx
je 0x10007e9f
call fcn.100075a0
push edi
call fcn.100660ce
add esp, 4
inc dword [ebp - 0x44]
push 0x1f4
mov dword [esi], ebx
mov dword [esi + 4], ebx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 1
call fcn.1000b698
mov byte [ebp - 4], bl
cmp dword [ebp - 0x1c], 0x10
jb 0x10007ed3
mov eax, dword [ebp - 0x30]
push eax
call fcn.100660ce
add esp, 4
mov dword [ebp - 0x20], ebx
mov byte [ebp - 0x30], bl
mov ebx, dword [ebp - 0x3c]
mov dword [ebp - 0x1c], 0xf
jmp 0x10007740
cmp dword [ebp + 0x10], 0
je 0x10007ef9
push 0x1009877c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp + 0xc]
lea ecx, [eax - 0xc]
cmp ecx, dword [0x10095a00]
je 0x10007f24
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x10007f24
mov edx, dword [ebp + 0xc]
add edx, 0xfffffff4
push edx
call fcn.10066c8a
add esp, 4
mov eax, 2
jmp 0x10008091
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x78]
mov dword [ebp - 0x34], ebx
call fcn.10065fca
push 0x1008f174
lea ecx, [ebp - 0x78]
push ecx
mov dword [ebp - 0x78], vtable.std::bad_alloc.0
call fcn.1006618e
lea edx, [ebp - 0x58]
push edx
lea ecx, [ebp - 0x88]
mov dword [ebp - 0x58], ebx
call fcn.10065fca
push 0x1008f174
lea eax, [ebp - 0x88]
push eax
mov dword [ebp - 0x88], vtable.std::bad_alloc.0
call fcn.1006618e
cmp dword [ebp + 0x10], 0
je 0x10007f90
push 0x1009877c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 1
call fcn.1000b698
cmp dword [ebp - 0x1c], 0x10
jb 0x10007fae
mov ecx, dword [ebp - 0x30]
push ecx
call fcn.100660ce
add esp, 4
mov eax, dword [ebp + 0xc]
lea edx, [eax - 0xc]
mov dword [ebp - 0x1c], 0xf
mov dword [ebp - 0x20], 0
mov byte [ebp - 0x30], 0
cmp edx, dword [0x10095a00]
je 0x10007feb
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x10007feb
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff4
push eax
call fcn.10066c8a
add esp, 4
mov eax, 0x80004005
jmp 0x10008091
mov edi, dword [ebp - 0x38]
mov eax, dword [edi + 8]
test eax, eax
je 0x10008008
push eax
call fcn.100660ce
add esp, 4
mov esi, dword [ebp - 0x4c]
add esi, 2
push esi
call fcn.1006555b
mov ebx, dword [ebp - 0x3c]
add esp, 4
push esi
push ebx
push eax
mov dword [edi + 8], eax
call fcn.10065820
add esp, 0xc
push ebx
mov dword [edi + 0xc], esi
call fcn.10066c8a
add esp, 4
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 1
call fcn.1000b698
cmp dword [ebp - 0x1c], 0x10
jb 0x10008052
mov ecx, dword [ebp - 0x30]
push ecx
call fcn.100660ce
add esp, 4
mov eax, dword [ebp + 0xc]
lea edx, [eax - 0xc]
mov dword [ebp - 0x1c], 0xf
mov dword [ebp - 0x20], 0
mov byte [ebp - 0x30], 0
cmp edx, dword [0x10095a00]
je 0x1000808f
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x1000808f
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff4
push eax
call fcn.10066c8a
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.100660ff
mov esp, ebp
pop ebp
ret 0xc