Function at 0x10012740
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x3c
push esi
mov esi, dword [esp + 0x48]
push edi
xor edi, edi
cmp esi, edi
mov dword [esp + 0x10], esi
jne 0x1001275b
pop edi
xor eax, eax
pop esi
add esp, 0x3c
ret
push esi
call fcn.10016bc0
add esp, 4
test eax, eax
jne 0x1001276e
pop edi
pop esi
add esp, 0x3c
ret
push ebx
mov dword [esp + 0xc], edi
mov eax, dword [esi]
push ebp
mov ecx, 1
xor ebp, ebp
cmp eax, ecx
je 0x100129fc
cmp eax, 3
je 0x100129fc
cmp eax, 2
jne 0x10012ddb
mov eax, dword [esp + 0x50]
mov esi, dword [esi + 4]
cmp eax, ecx
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], ecx
jle 0x10012ddb
lea ebx, [esp + 0x60]
dec eax
mov dword [esp + 0x50], ebx
mov dword [esp + 0x30], eax
jmp 0x100127c3
mov esi, dword [esp + 0x14]
xor edi, edi
mov eax, dword [ebx + 8]
mov ecx, eax
and ecx, 0x20000000
cmp ecx, 0x20000000
jne 0x10012925
and eax, 0xdfffffff
mov dword [ebx + 8], eax
mov ecx, dword [ebx]
cmp ecx, edi
je 0x100129da
cmp eax, 0x80000004
jne 0x10012859
mov eax, dword [ecx]
lea edx, [esp + 0x28]
push edx
push eax
call fcn.10016690
mov ecx, dword [esp + 0x30]
add esp, 8
xor edi, edi
test ecx, ecx
jbe 0x100129da
mov esi, eax
mov eax, dword [esi]
test eax, eax
je 0x10012822
push eax
call fcn.10011580
add esp, 4
test ebp, ebp
mov dword [esp + 0x2c], 0
jne 0x10012842
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x2c]
push ecx
push edx
call fcn.10012250
add esp, 8
mov ebp, eax
mov eax, dword [esp + 0x2c]
inc edi
mov dword [esi], eax
mov eax, dword [esp + 0x28]
add esi, 4
cmp edi, eax
jb 0x10012813
jmp 0x100129da
cmp eax, 0x80000005
jne 0x100128c3
lea edx, [esp + 0x20]
push edx
push ecx
call fcn.10016690
mov eax, dword [esp + 0x28]
add esp, 8
xor esi, esi
test eax, eax
jbe 0x100129da
mov edi, dword [esp + 0x14]
mov eax, dword [ebx]
test eax, eax
je 0x10012891
mov eax, dword [eax]
push eax
call fcn.10011580
add esp, 4
test ebp, ebp
mov dword [esp + 0x24], 0
jne 0x100128ad
lea ecx, [esp + 0x24]
push ecx
push edi
call fcn.100122f0
add esp, 8
mov ebp, eax
mov edx, dword [ebx]
mov eax, dword [esp + 0x24]
inc esi
mov dword [edx], eax
mov eax, dword [esp + 0x20]
cmp esi, eax
jb 0x10012880
jmp 0x100129da
push eax
call fcn.10016620
mov edi, eax
add esp, 4
test edi, edi
je 0x100129da
mov edx, dword [ebx]
lea ecx, [esp + 0x40]
push ecx
mov eax, dword [edx]
push eax
call fcn.10016690
mov esi, dword [esp + 0x48]
mov edx, eax
imul esi, edi
mov ecx, esi
xor eax, eax
mov ebx, ecx
mov edi, edx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, ebx
add esp, 8
and ecx, 3
test ebp, ebp
rep stosb byte es:[edi], al
jne 0x100129d6
mov ecx, dword [esp + 0x14]
push esi
push edx
mov eax, dword [ecx]
call dword [eax + 0x20]
cmp esi, eax
jle 0x100129d6
jmp 0x100129d1
cmp eax, 0x80000004
jne 0x1001295f
mov eax, dword [ebx]
cmp eax, edi
je 0x1001293d
mov ecx, dword [eax]
push ecx
call fcn.10011580
add esp, 4
cmp ebp, edi
mov dword [esp + 0x1c], edi
jne 0x10012955
lea edx, [esp + 0x1c]
push edx
push esi
call fcn.10012250
add esp, 8
mov ebp, eax
mov eax, dword [ebx]
mov ecx, dword [esp + 0x1c]
mov dword [eax], ecx
jmp 0x100129da
cmp eax, 0x80000005
jne 0x10012999
mov eax, dword [ebx]
cmp eax, edi
je 0x10012977
mov edx, dword [eax]
push edx
call fcn.10011580
add esp, 4
cmp ebp, edi
mov dword [esp + 0x18], edi
jne 0x1001298f
lea eax, [esp + 0x18]
push eax
push esi
call fcn.100122f0
add esp, 8
mov ebp, eax
mov ecx, dword [ebx]
mov edx, dword [esp + 0x18]
mov dword [ecx], edx
jmp 0x100129da
push eax
call fcn.10016620
mov esi, eax
add esp, 4
cmp esi, edi
je 0x100129da
mov edx, dword [ebx]
mov ecx, esi
mov ebx, ecx
xor eax, eax
mov edi, edx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, ebx
and ecx, 3
test ebp, ebp
rep stosb byte es:[edi], al
jne 0x100129d6
mov ecx, dword [esp + 0x14]
push esi
push edx
mov eax, dword [ecx]
call dword [eax + 0x20]
cmp esi, eax
jle 0x100129d6
mov ebp, 1
mov ebx, dword [esp + 0x50]
mov eax, dword [esp + 0x30]
add ebx, 0xc
dec eax
mov dword [esp + 0x50], ebx
mov dword [esp + 0x30], eax
jne 0x100127bd
mov eax, dword [esp + 0x10]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x3c
ret
mov eax, dword [esp + 0x50]
mov ebx, dword [esi + 4]
cmp eax, ecx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x40], ecx
jle 0x10012ddb
lea edi, [esp + 0x60]
mov dword [esp + 0x1c], edi
jmp 0x10012a2d
mov esi, dword [esp + 0x18]
mov ebx, dword [esp + 0x14]
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x10012ddb
mov eax, dword [edi + 8]
mov ecx, eax
and ecx, 0x20000000
cmp ecx, 0x20000000
jne 0x10012c49
and eax, 0xdfffffff
mov dword [edi + 8], eax
mov ecx, dword [edi]
test ecx, ecx
je 0x10012da7
cmp eax, 0x80000004
jne 0x10012aff
mov eax, dword [ecx]
lea edx, [esp + 0x30]
push edx
push eax
call fcn.10016690
mov ecx, dword [esp + 0x38]
add esp, 8
xor edi, edi
test ecx, ecx
jbe 0x10012da7
mov esi, eax
mov eax, dword [esi]
test eax, eax
je 0x10012a9c
push eax
call fcn.10011580
add esp, 4
test ebp, ebp
mov dword [esp + 0x20], 0
jne 0x10012adc
mov eax, dword [esp + 0x18]
cmp dword [eax], 3
jne 0x10012ac3
lea ecx, [esp + 0x10]
lea edx, [esp + 0x20]
push ecx
push edx
push eax
call fcn.10012370
jmp 0x10012ad7
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x10]
lea ecx, [esp + 0x20]
push eax
push ecx
push edx
call fcn.10012020
add esp, 0xc
mov ebp, eax
mov eax, dword [esp + 0x20]
mov dword [esi], eax
mov eax, dword [esp + 0x10]
test eax, eax
je 0x10012da7
mov eax, dword [esp + 0x30]
inc edi
add esi, 4
cmp edi, eax
jb 0x10012a8d
jmp 0x10012da7
cmp eax, 0x80000005
jne 0x10012b9a
lea edx, [esp + 0x34]
push edx
push ecx
call fcn.10016690
mov ecx, dword [esp + 0x3c]
add esp, 8
xor edi, edi
test ecx, ecx
jbe 0x10012da7
mov esi, eax
mov eax, dword [esi]
test eax, eax
je 0x10012b37
push eax
call fcn.10011580
add esp, 4
test ebp, ebp
mov dword [esp + 0x24], 0
jne 0x10012b77
mov eax, dword [esp + 0x18]
cmp dword [eax], 3
jne 0x10012b5e
lea ecx, [esp + 0x10]
lea edx, [esp + 0x24]
push ecx
push edx
push eax
call fcn.10012620
jmp 0x10012b72
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x10]
lea ecx, [esp + 0x24]
push eax
push ecx
push edx
call fcn.100121b0
add esp, 0xc
mov ebp, eax
mov eax, dword [esp + 0x24]
mov dword [esi], eax
mov eax, dword [esp + 0x10]
test eax, eax
je 0x10012da7
mov eax, dword [esp + 0x34]
inc edi
add esi, 4
cmp edi, eax
jb 0x10012b28
jmp 0x10012da7
push eax
call fcn.10016620
mov edi, eax
add esp, 4
test edi, edi
je 0x10012da7
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x44]
push ecx
mov eax, dword [edx]
mov ecx, dword [eax]
push ecx
call fcn.10016690
mov esi, dword [esp + 0x4c]
mov ebx, eax
imul esi, edi
mov ecx, esi
xor eax, eax
mov edx, ecx
mov edi, ebx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 8
and ecx, 3
test ebp, ebp
rep stosb byte es:[edi], al
jne 0x10012da7
mov edi, dword [esp + 0x14]
push 1
push ebp
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esp + 0x48], eax
lea eax, [esp + 0x38]
push ebp
push eax
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10012dd3
mov eax, dword [esp + 0x18]
cmp dword [eax], 3
jne 0x10012c3a
mov edx, dword [eax + 0xc]
lea ecx, [eax + 0x10]
push ecx
mov ecx, dword [esp + 0x4c]
add eax, 0x34
push edx
push eax
mov eax, dword [esp + 0x44]
push eax
push ebx
push ecx
call fcn.10016390
add esp, 0x18
cmp dword [esp + 0x38], esi
jge 0x10012da7
jmp 0x10012da2
cmp eax, 0x80000004
jne 0x10012cb6
mov eax, dword [edi]
test eax, eax
je 0x10012c61
mov edx, dword [eax]
push edx
call fcn.10011580
add esp, 4
test ebp, ebp
mov dword [esp + 0x28], 0
jne 0x10012ca9
cmp dword [esi], 3
jne 0x10012c94
lea eax, [esp + 0x10]
lea ecx, [esp + 0x28]
push eax
push ecx
push esi
call fcn.10012370
mov ecx, dword [edi]
mov edx, dword [esp + 0x34]
add esp, 0xc
mov ebp, eax
mov dword [ecx], edx
jmp 0x10012da7
lea edx, [esp + 0x10]
lea eax, [esp + 0x28]
push edx
push eax
push ebx
call fcn.10012020
add esp, 0xc
mov ebp, eax
mov ecx, dword [edi]
mov edx, dword [esp + 0x28]
mov dword [ecx], edx
jmp 0x10012da7
cmp eax, 0x80000005
jne 0x10012d23
mov eax, dword [edi]
test eax, eax
je 0x10012cce
mov eax, dword [eax]
push eax
call fcn.10011580
add esp, 4
test ebp, ebp
mov dword [esp + 0x2c], 0
jne 0x10012d16
cmp dword [esi], 3
jne 0x10012d01
lea ecx, [esp + 0x10]
lea edx, [esp + 0x2c]
push ecx
push edx
push esi
call fcn.10012620
mov edx, dword [edi]
mov ebp, eax
mov eax, dword [esp + 0x38]
add esp, 0xc
mov dword [edx], eax
jmp 0x10012da7
lea eax, [esp + 0x10]
lea ecx, [esp + 0x2c]
push eax
push ecx
push ebx
call fcn.100121b0
add esp, 0xc
mov ebp, eax
mov edx, dword [edi]
mov eax, dword [esp + 0x2c]
mov dword [edx], eax
jmp 0x10012da7
push eax
call fcn.10016620
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x10012da7
mov ecx, dword [esp + 0x1c]
xor eax, eax
mov esi, dword [ecx]
mov ecx, ebx
mov edx, ecx
mov edi, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
test ebp, ebp
rep stosb byte es:[edi], al
jne 0x10012da7
mov eax, dword [esp + 0x14]
push 1
push ebp
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x3c]
push ebp
push ecx
push ebx
push esi
push edx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10012dd3
mov eax, dword [esp + 0x18]
cmp dword [eax], 3
jne 0x10012d9c
mov edx, dword [eax + 0xc]
lea ecx, [eax + 0x10]
push ecx
add eax, 0x34
push edx
push eax
mov eax, dword [esp + 0x48]
push eax
push esi
push edi
call fcn.10016390
add esp, 0x18
cmp ebx, dword [esp + 0x3c]
jle 0x10012da7
mov ebp, 1
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x50]
inc eax
add edx, 0xc
cmp eax, ecx
mov dword [esp + 0x40], eax
mov dword [esp + 0x1c], edx
jl 0x10012a21
mov eax, dword [esp + 0x10]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x3c
ret
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x10]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x3c
ret