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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x10024622
mov eax, dword fs:[0]
push eax
sub esp, 0x198
mov eax, dword [0x1002c2b8]
xor eax, esp
mov dword [esp + 0x190], eax
push ebx
push esi
push edi
mov eax, dword [0x1002c2b8]
xor eax, esp
push eax
lea eax, [esp + 0x1a8]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
mov al, byte [ebx]
mov esi, ecx
mov dword [esp + 0x14], esi
cmp al, 0xc9
je 0x10007132
movzx eax, al
cmp eax, 6
ja case.default.0x1000698f
jmp dword [eax*4 + 0x10007158]
mov eax, dword [esi + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ecx, dword [esi + 0x224]
push 0xffffffffffffffff
push ecx
mov dword [esp + 0x20], 0
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0
push 2
push 3
push 0
push 1
push connect
lea edx, [esi + 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x10006a9b
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
lea esi, [eax + 3]
push esi
call fcn.10011f29
add esp, 4
push esi
mov edi, eax
push 0
push edi
call fcn.1001ccd0
add esp, 0xc
push 0
lea eax, [esp + 0x1c]
push eax
lea ecx, [esi - 1]
push ecx
lea edx, [edi + 1]
push edx
push ebx
mov byte [edi], 7
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x14]
mov ecx, dword [eax + 0x224]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
cmp dword [esp + 0x1c], 0
je 0x10006a66
cmp esi, 2
jae 0x10006a58
mov eax, dword [esp + 0x14]
cmp dword [eax + 8], 0
mov byte [esp + 0x13], 8
jne 0x10006a58
mov ecx, dword [eax + 4]
mov edx, dword [ecx]
mov edx, dword [edx + 8]
push 1
lea eax, [esp + 0x17]
push eax
call edx
mov ecx, dword [esp + 0x14]
push edi
mov edx, esi
call fcn.10002bb0
jmp 0x10006a86
mov eax, dword [esp + 0x14]
cmp dword [eax + 8], 0
mov byte [esp + 0x13], 8
jne 0x10006a86
mov ecx, dword [eax + 4]
mov eax, dword [ecx]
mov eax, dword [eax + 8]
push 1
lea edx, [esp + 0x17]
push edx
call eax
push edi
call fcn.10013359
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10007132
mov ecx, dword [esi + 0x224]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
cmp dword [esi + 8], 0
mov byte [esp + 0x13], 8
jne 0x10007132
mov ecx, dword [esi + 4]
mov edx, dword [ecx]
mov edx, dword [edx + 8]
push 1
lea eax, [esp + 0x17]
push eax
call edx
jmp 0x10007132
add esi, 0x18
push esi
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x10007132
lea eax, [esp + 0x14]
push eax
push 2
push 0
push 0x10028314
push connect
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ecx, dword [esp + 0x14]
push str.open
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
mov edx, dword [esp + 0x14]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edx
call esi
lea eax, [esp + 0x14]
push eax
push 0x10028314
push connect
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
jne 0x10006b69
mov ecx, dword [esp + 0x14]
push 4
push 0x10028328
push 3
push eax
push str.open
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x10006b69
mov edx, dword [esp + 0x14]
push edx
call esi
jmp 0x10007132
mov eax, dword [esp + 0x14]
push eax
call esi
jmp 0x10007132
add esi, 0x230
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [ebp + 0xc]
inc ebx
dec edi
push ebx
call fcn.100071b0
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x10007132
lea ecx, [esp + 0x14]
push ecx
push 2
push 0
push 0x10028314
push connect
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edx, dword [esp + 0x14]
push str.open
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
mov eax, dword [esp + 0x14]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push eax
call esi
lea ecx, [esp + 0x14]
push ecx
push 0x10028314
push connect
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
jne 0x10006c0a
mov edx, dword [esp + 0x14]
push 4
push 0x1002832c
push 3
push eax
push str.open
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x10006b69
mov ecx, dword [esp + 0x14]
push ecx
call esi
jmp 0x10007132
mov dword [esi + 0x24c], 0
jmp 0x10007132
lea edx, [ebx + 1]
lea eax, [esp + 0x14c]
call fcn.100072a0
xor ebx, ebx
lea eax, [esp + 0x14c]
lea esi, [esp + 0xdc]
mov dword [esp + 0x1b0], ebx
call fcn.10007270
xor esi, esi
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], ebx
lea edx, [esp + 0x84]
push edx
mov byte [esp + 0x1b4], 2
call fcn.10007500
mov byte [esp + 0x1b0], 3
mov eax, dword [esp + 0xf0]
mov edx, dword [esp + 0xdc]
mov ecx, edx
cmp eax, 0x10
jae 0x10006c97
lea ecx, [esp + 0xdc]
add ecx, dword [esp + 0xec]
cmp eax, 0x10
mov eax, edx
jae 0x10006cac
lea eax, [esp + 0xdc]
push ecx
push eax
lea eax, [esp + 0x9c]
push eax
lea edx, [esp + 0x90]
call fcn.10007740
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], ebx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x64], ebx
mov byte [esp + 0x68], 0
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], ebx
mov byte [esp + 0x74], 0
mov dword [esp + 0x78], ebx
mov dword [esp + 0x7c], ebx
mov byte [esp + 0x80], 0
lea eax, [esp + 0x3c]
lea ecx, [esp + 0x94]
mov byte [esp + 0x1b0], 5
call fcn.10007d90
test al, al
jne 0x10006e5e
lea edi, [esp + 0x130]
lea ecx, [esp + 0xa4]
call fcn.10007450
mov byte [esp + 0x1b0], 6
cmp dword [eax + 0x14], 0x10
jb 0x10006d4d
mov edx, dword [eax]
jmp 0x10006d4f
mov edx, eax
mov eax, edx
mov dword [esp + 0x10c], 0xf
mov dword [esp + 0x108], ebx
mov byte [esp + 0xf8], 0
lea esi, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10006d70
sub eax, esi
push edx
mov edi, eax
lea esi, [esp + 0xfc]
call fcn.10007e10
mov byte [esp + 0x1b0], 8
cmp dword [esp + 0x144], 0x10
jb 0x10006daa
mov ecx, dword [esp + 0x130]
push ecx
call fcn.10012868
add esp, 4
push 2
push 0x1002833c
lea edx, [esp + 0x100]
push edx
mov dword [esp + 0x150], 0xf
mov dword [esp + 0x14c], ebx
mov byte [esp + 0x13c], 0
call fcn.10007b90
cmp eax, 0xffffffff
je 0x10006e04
push ebx
push eax
lea eax, [esp + 0x100]
call fcn.10007a00
push 2
push 0x1002833c
lea eax, [esp + 0x100]
push eax
call fcn.10007b90
cmp eax, 0xffffffff
jne 0x10006ddd
lea ecx, [esp + 0xf8]
lea edi, [esp + 0x28]
call fcn.10007670
lea esi, [esp + 0x94]
call fcn.100077e0
mov byte [esp + 0x1b0], 5
cmp dword [esp + 0x10c], 0x10
jb 0x10006e42
mov ecx, dword [esp + 0xf8]
push ecx
call fcn.10012868
add esp, 4
lea eax, [esp + 0x3c]
lea ecx, [esp + 0x94]
call fcn.10007d90
test al, al
je 0x10006d28
mov esi, dword [esp + 0x2c]
sub esi, dword [esp + 0x28]
mov eax, 0x92492493
mov ecx, esi
imul ecx
add edx, ecx
sar edx, 4
mov esi, edx
shr esi, 0x1f
add esi, edx
mov dword [esp + 0x18], esi
je 0x1000707d
mov eax, dword [esp + 0x14]
add eax, 0x250
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x10032d7c]
mov edi, dword [0x10032d78]
mov edx, eax
sub edx, edi
sar edx, 2
test edx, edx
je 0x10006ed5
cmp edi, eax
je 0x10006ed5
jmp 0x10006eb0
mov esi, dword [edi]
cmp esi, ebx
je 0x10006ebd
call fcn.10006310
mov dword [edi], ebx
push edi
lea esi, [esp + 0x3c]
call fcn.10007410
mov edi, dword [eax]
cmp edi, dword [0x10032d7c]
jne 0x10006eb0
mov esi, dword [esp + 0x18]
cmp esi, ebx
jbe 0x10007055
mov ebx, dword [esp + 0x28]
mov dword [esp + 0x18], esi
push 6
push 0x10028340
push ebx
call fcn.10007b90
mov ecx, dword [ebx + 0x10]
sub ecx, eax
sub ecx, 6
mov dword [esp + 0x1c], eax
push ecx
add eax, 6
push eax
lea esi, [esp + 0x11c]
mov ecx, ebx
call fcn.10007340
mov edi, eax
mov esi, ebx
mov byte [esp + 0x1b0], 9
call fcn.100078a0
mov byte [esp + 0x1b0], 5
cmp dword [esp + 0x128], 0x10
jb 0x10006f44
mov eax, dword [esp + 0x114]
push eax
call fcn.10012868
add esp, 4
xor edi, edi
cmp dword [esp + 0x1c], 0xffffffff
mov dword [esp + 0x128], 0xf
mov dword [esp + 0x124], edi
mov byte [esp + 0x114], 0
je 0x10007046
push ebx
mov edx, 0x10028348
call fcn.10007310
mov esi, eax
mov dword [esp + 0x1c], esi
cmp esi, 0xffffffff
je 0x10007046
push 0x38
call fcn.10012fb5
add esp, 4
cmp eax, edi
je 0x10006fb1
mov ecx, 0xf
mov dword [eax + 0x14], ecx
mov dword [eax + 0x10], edi
mov byte [eax], 0
mov dword [eax + 0x30], ecx
mov dword [eax + 0x2c], edi
mov byte [eax + 0x1c], 0
mov dword [esp + 0x20], eax
jmp 0x10006fb5
mov dword [esp + 0x20], edi
mov ecx, dword [esp + 0x20]
push esi
mov dword [esp + 0x28], ecx
push edi
lea esi, [esp + 0x170]
mov ecx, ebx
call fcn.10007340
mov esi, dword [esp + 0x20]
mov edi, eax
mov byte [esp + 0x1b0], 0xa
call fcn.100078a0
lea esi, [esp + 0x168]
mov byte [esp + 0x1b0], 5
call fcn.100072e0
mov eax, dword [ebx + 0x10]
mov ecx, dword [esp + 0x1c]
sub eax, ecx
sub eax, 4
add ecx, 4
push eax
push ecx
lea esi, [esp + 0x18c]
mov ecx, ebx
call fcn.10007340
mov esi, dword [esp + 0x20]
add esi, 0x1c
mov edi, eax
mov byte [esp + 0x1b0], 0xb
call fcn.100078a0
lea esi, [esp + 0x184]
mov byte [esp + 0x1b0], 5
call fcn.100072e0
lea eax, [esp + 0x24]
call fcn.10007390
add ebx, 0x1c
dec dword [esp + 0x18]
jne 0x10006ee5
xor ebx, ebx
mov esi, dword [esp + 0x14]
lea eax, [esi + 0x250]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0x10028350
push esi
call fcn.10007210
mov dword [esi + 0x24c], 1
jmp 0x10007092
mov esi, dword [esp + 0x14]
push 0x10028364
push esi
call fcn.10007210
mov dword [esi + 0x24c], ebx
mov eax, dword [esp + 0xa8]
cmp eax, ebx
je 0x100070a6
push eax
call fcn.10012868
add esp, 4
lea edx, [esp + 0x84]
push edx
mov dword [esp + 0xac], ebx
mov dword [esp + 0xb0], ebx
mov dword [esp + 0xb4], ebx
mov byte [esp + 0x1b4], 2
call fcn.100075a0
lea eax, [esp + 0x28]
push eax
call fcn.10007d30
mov esi, 0x10
cmp dword [esp + 0xf0], esi
jb 0x100070f8
mov ecx, dword [esp + 0xdc]
push ecx
call fcn.10012868
add esp, 4
mov dword [esp + 0xf0], 0xf
mov dword [esp + 0xec], ebx
mov byte [esp + 0xdc], 0
cmp dword [esp + 0x160], esi
jb 0x10007132
mov edx, dword [esp + 0x14c]
push edx
call fcn.10012868
add esp, 4
jmp 0x10007132
call fcn.100012a0
mov ecx, dword [esp + 0x1a8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x190]
xor ecx, esp
call fcn.10012873
mov esp, ebp
pop ebp
ret 8