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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc8
mov dword [ebp - 0x74], 0x3e8
mov eax, dword [ebp + 8]
push eax
call fcn.1000ef40
add esp, 4
test eax, eax
ja 0x10006a73
mov eax, 0x3ea
jmp 0x1000719a
push 0
push 0
push 3
push 0
push 0
push bind
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0xc8], eax
cmp dword [ebp - 0xc8], 0xffffffff
jne 0x10006aa5
mov eax, 0x3eb
jmp 0x1000719a
push 0
mov edx, dword [ebp - 0xc8]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x80], eax
push 0
lea eax, [ebp - 0x24]
push eax
push 0xe
lea ecx, [ebp - 0x20]
push ecx
mov edx, dword [ebp - 0xc8]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 0x24], 0xe
je 0x10006aed
mov eax, dword [ebp - 0xc8]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x3ec
jmp 0x1000719a
push 0
lea ecx, [ebp - 0x24]
push ecx
push 0x28
lea edx, [ebp - 0xbc]
push edx
mov eax, dword [ebp - 0xc8]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 0x24], 0x28
je 0x10006b26
mov ecx, dword [ebp - 0xc8]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x3ec
jmp 0x1000719a
mov edx, dword [ebp - 0x80]
sub edx, 0x435
push edx
call fcn.1000f659
add esp, 4
mov dword [ebp - 0x8c], eax
push 0
push 0
push 0x436
mov eax, dword [ebp - 0xc8]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea ecx, [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x80]
sub edx, 0x436
push edx
mov eax, dword [ebp - 0x8c]
push eax
mov ecx, dword [ebp - 0xc8]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp - 0xc8]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x20]
and eax, 0xffff
cmp eax, 0x4d42
je 0x10006b9e
mov eax, 0x3f0
jmp 0x1000719a
mov ecx, dword [ebp - 0xae]
and ecx, 0xffff
cmp ecx, 8
je 0x10006bb9
mov eax, 0x3f0
jmp 0x1000719a
mov edx, dword [ebp - 0xb8]
mov dword [ebp - 0x28], edx
cmp dword [ebp - 0x28], 0
jl 0x10006bd1
cmp dword [ebp - 0x28], 0x270f
jle 0x10006bdb
mov eax, 0x3ea
jmp 0x1000719a
mov eax, dword [ebp - 0xb4]
mov dword [ebp - 0xc0], eax
cmp dword [ebp - 0xc0], 0
jl 0x10006bfc
cmp dword [ebp - 0xc0], 0x270f
jle 0x10006c06
mov eax, 0x3ea
jmp 0x1000719a
mov eax, dword [ebp - 0x28]
add eax, 7
cdq
and edx, 7
add eax, edx
sar eax, 3
shl eax, 3
mov dword [ebp - 0x68], eax
cmp dword [ebp - 0x68], 0
jl 0x10006c2a
cmp dword [ebp - 0x68], 0x270f
jle 0x10006c34
mov eax, 0x3ea
jmp 0x1000719a
mov eax, dword [ebp - 0x28]
add eax, 0x1f
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
shl eax, 5
mov dword [ebp - 0xc4], eax
mov dword [ebp - 0x30], 0x1f39
mov dword [ebp - 0x38], 0x1f39
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x94], 0
mov dword [ebp - 0x78], 0
mov dword [ebp - 0x6c], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x90], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x88], 0
mov byte [ebp - 0xc], 0
mov dword [ebp - 8], 0
mov ecx, dword [ebp - 0xb8]
add ecx, 7
sar ecx, 3
mov dword [ebp - 0x78], ecx
mov edx, dword [ebp - 0xb4]
lea eax, [edx*4 + 7]
cdq
and edx, 7
add eax, edx
sar eax, 3
shl eax, 3
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x78]
imul eax, dword [ebp - 0x6c]
mov dword [ebp - 0x60], eax
push 0x23
push 0
lea ecx, [ebp - 0x5c]
push ecx
call fcn.1000f350
add esp, 0xc
mov edx, dword [ebp - 0x6c]
shr edx, 8
push edx
mov eax, dword [ebp - 0x6c]
xor edx, edx
mov ecx, 0x100
div ecx
push edx
mov eax, dword [ebp - 0x68]
cdq
and edx, 0xff
add eax, edx
sar eax, 8
push eax
mov edx, dword [ebp - 0x68]
and edx, 0x800000ff
jns 0x10006d3e
dec edx
or edx, 0xffffff00
inc edx
push edx
push 0xd
push str.1Y1166700000000_c_c_c_c_c
lea eax, [ebp - 0x5c]
push eax
call fcn.1000f2f5
add esp, 0x1c
mov ecx, dword [0x1001fb18]
push ecx
push 0x14
lea edx, [ebp - 0x5c]
push edx
call fcn.100021c0
add esp, 0xc
mov dword [ebp - 0x74], eax
cmp dword [ebp - 0x74], 0x3e8
je 0x10006d7b
mov eax, dword [ebp - 0x74]
jmp 0x1000719a
mov eax, dword [ebp - 0x6c]
mov ecx, dword [ebp - 0x60]
lea edx, [ecx + eax*4 + 0x80]
push edx
call fcn.1000f659
add esp, 4
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x10006da6
mov dword [ebp - 0x74], 0x3e9
jmp 0x10007198
mov eax, dword [ebp - 0x6c]
mov ecx, dword [ebp - 0x60]
lea edx, [ecx + eax*4 + 0x80]
push edx
push 0xff
mov eax, dword [ebp - 8]
push eax
call fcn.1000f350
add esp, 0xc
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x34], ecx
mov edx, dword [ebp - 0xb8]
add edx, 3
and edx, 0xfffffffc
mov dword [ebp - 0x94], edx
mov eax, dword [ebp - 0xb4]
sub eax, 1
mov dword [ebp - 0x90], eax
jmp 0x10006dfd
mov ecx, dword [ebp - 0x90]
sub ecx, 1
mov dword [ebp - 0x90], ecx
cmp dword [ebp - 0x90], 0
jl 0x10006fe0
mov dword [ebp - 4], 7
jmp 0x10006e1c
mov edx, dword [ebp - 4]
sub edx, 1
mov dword [ebp - 4], edx
cmp dword [ebp - 4], 4
jl 0x10006fdb
mov dword [ebp - 0x10], 0
jmp 0x10006e38
mov eax, dword [ebp - 0x10]
add eax, 1
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x94]
shr ecx, 3
cmp dword [ebp - 0x10], ecx
jae 0x10006edd
mov byte [ebp - 0xc], 0
mov dword [ebp - 0x88], 0
jmp 0x10006e69
mov edx, dword [ebp - 0x88]
add edx, 1
mov dword [ebp - 0x88], edx
cmp dword [ebp - 0x88], 8
jge 0x10006ebf
mov eax, dword [ebp - 0x90]
imul eax, dword [ebp - 0x94]
mov ecx, dword [ebp - 0x88]
add ecx, eax
mov edx, dword [ebp - 0x10]
lea eax, [ecx + edx*8]
mov ecx, dword [ebp - 0x8c]
movsx edx, byte [ecx + eax]
mov eax, 1
mov ecx, dword [ebp - 4]
shl eax, cl
and edx, eax
mov ecx, dword [ebp - 4]
sar edx, cl
mov ecx, 7
sub ecx, dword [ebp - 0x88]
shl edx, cl
mov cl, byte [ebp - 0xc]
or cl, dl
mov byte [ebp - 0xc], cl
jmp 0x10006e5a
mov edx, dword [ebp - 0xc]
and edx, 0xff
not edx
mov eax, dword [ebp - 0x34]
mov byte [eax], dl
mov ecx, dword [ebp - 0x34]
add ecx, 1
mov dword [ebp - 0x34], ecx
jmp 0x10006e2f
mov eax, dword [ebp - 0x94]
xor edx, edx
mov ecx, 8
div ecx
test edx, edx
je 0x10006fb8
mov byte [ebp - 0xc], 0
mov eax, dword [ebp - 0x94]
add eax, 3
and al, 0xfc
xor edx, edx
mov ecx, 8
div ecx
test edx, edx
je 0x10006f16
mov byte [ebp - 0xc], 0xf
jmp 0x10006f1a
mov byte [ebp - 0xc], 0xff
mov dword [ebp - 0x88], 0
jmp 0x10006f35
mov edx, dword [ebp - 0x88]
add edx, 1
mov dword [ebp - 0x88], edx
mov eax, dword [ebp - 0x94]
xor edx, edx
mov ecx, 8
div ecx
cmp dword [ebp - 0x88], edx
jae 0x10006f9f
mov edx, dword [ebp - 0x90]
imul edx, dword [ebp - 0x94]
mov eax, dword [ebp - 0x94]
shr eax, 3
mov ecx, dword [ebp - 0x88]
add ecx, edx
lea edx, [ecx + eax*8]
mov eax, dword [ebp - 0x8c]
movsx edx, byte [eax + edx]
mov eax, 1
mov ecx, dword [ebp - 4]
shl eax, cl
and edx, eax
mov ecx, dword [ebp - 4]
sar edx, cl
mov ecx, 7
sub ecx, dword [ebp - 0x88]
shl edx, cl
mov cl, byte [ebp - 0xc]
or cl, dl
mov byte [ebp - 0xc], cl
jmp 0x10006f26
mov edx, dword [ebp - 0xc]
and edx, 0xff
not edx
mov eax, dword [ebp - 0x34]
mov byte [eax], dl
mov ecx, dword [ebp - 0x34]
add ecx, 1
mov dword [ebp - 0x34], ecx
mov edx, dword [ebp - 0x34]
mov byte [edx], 0xff
mov eax, dword [ebp - 0x34]
add eax, 1
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x34]
mov byte [ecx], 1
mov edx, dword [ebp - 0x34]
add edx, 1
mov dword [ebp - 0x34], edx
jmp 0x10006e13
jmp 0x10006dee
mov eax, dword [ebp - 0xb4]
shl eax, 2
and eax, reloc.WS2_32.dll_getsockopt
jns 0x10006ff5
dec eax
or eax, 0xfffffff8
inc eax
test eax, eax
je 0x10007094
mov dword [ebp - 0x90], 0
jmp 0x10007018
mov ecx, dword [ebp - 0x90]
add ecx, 1
mov dword [ebp - 0x90], ecx
mov edx, dword [ebp - 0xb4]
shl edx, 2
and edx, reloc.WS2_32.dll_getsockopt
jns 0x1000702e
dec edx
or edx, 0xfffffff8
inc edx
mov eax, 7
sub eax, edx
cmp dword [ebp - 0x90], eax
jg 0x10007094
mov dword [ebp - 0x10], 0
jmp 0x1000704f
mov ecx, dword [ebp - 0x10]
add ecx, 1
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x94]
add edx, 7
shr edx, 3
cmp dword [ebp - 0x10], edx
jae 0x10007071
mov eax, dword [ebp - 0x34]
mov byte [eax], 0
mov ecx, dword [ebp - 0x34]
add ecx, 1
mov dword [ebp - 0x34], ecx
jmp 0x10007046
mov edx, dword [ebp - 0x34]
mov byte [edx], 0xff
mov eax, dword [ebp - 0x34]
add eax, 1
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x34]
mov byte [ecx], 1
mov edx, dword [ebp - 0x34]
add edx, 1
mov dword [ebp - 0x34], edx
jmp 0x10007009
mov eax, dword [ebp - 0x34]
sub eax, dword [ebp - 8]
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x84], 0
jmp 0x100070b8
mov ecx, dword [ebp - 0x84]
add ecx, 1
mov dword [ebp - 0x84], ecx
mov edx, dword [ebp - 0x7c]
shr edx, 0xa
cmp dword [ebp - 0x84], edx
jae 0x100070fb
mov eax, dword [0x1001fb18]
push eax
push 0x400
mov ecx, dword [ebp - 0x84]
shl ecx, 0xa
mov edx, dword [ebp - 8]
add edx, ecx
push edx
call fcn.100021c0
add esp, 0xc
mov dword [ebp - 0x74], eax
cmp dword [ebp - 0x74], 0x3e8
je 0x100070f9
jmp 0x10007196
jmp 0x100070a9
mov eax, dword [ebp - 0x7c]
xor edx, edx
mov ecx, 0x400
div ecx
test edx, edx
je 0x10007144
mov edx, dword [0x1001fb18]
push edx
mov eax, dword [ebp - 0x7c]
xor edx, edx
mov ecx, 0x400
div ecx
push edx
mov edx, dword [ebp - 0x84]
shl edx, 0xa
mov eax, dword [ebp - 8]
add eax, edx
push eax
call fcn.100021c0
add esp, 0xc
mov dword [ebp - 0x74], eax
cmp dword [ebp - 0x74], 0x3e8
je 0x10007144
jmp 0x10007194
cmp dword [ebp - 8], 0
je 0x1000715d
mov ecx, dword [ebp - 8]
push ecx
call fcn.1000f570
add esp, 4
mov dword [ebp - 8], 0
cmp dword [ebp - 0x8c], 0
je 0x1000717f
mov edx, dword [ebp - 0x8c]
push edx
call fcn.1000f570
add esp, 4
mov dword [ebp - 0x8c], 0
cmp dword [ebp - 0x74], 0x3e8
je 0x1000718d
mov eax, dword [ebp - 0x74]
jmp 0x1000719a
mov eax, 0x3e8
jmp 0x1000719a
jmp 0x10007144
jmp 0x10007144
jmp 0x10007144
mov esp, ebp
pop ebp
ret 4