Function at 0x10108860
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x234
mov eax, dword [0x1043900c]
xor eax, esp
mov dword [esp + 0x230], eax
push ebx
push esi
mov esi, ecx
mov ebx, edx
push edi
push ebx
mov dword [esp + 0x14], ebx
mov eax, dword [esi + 0x14]
mov edi, dword [esi + 0xc]
sub edi, dword [eax]
sub edi, 0x10
sar edi, 4
dec edi
mov dword [esp + 0x1c], edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_clearerr]
add esp, 4
mov ecx, esi
test edi, edi
jne 0x10108900
push 1
mov edx, ebx
call fcn.10108700
mov edi, dword [ebp + 8]
add esp, 4
mov ebx, eax
inc edi
push dword [esp + 0x10]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ferror]
add esp, 4
test eax, eax
je 0x10108b93
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov edi, dword [eax]
mov eax, dword [esi + 0xc]
push edi
mov byte [eax + 8], 0
add dword [esi + 0xc], 0x10
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
add esp, 4
test eax, eax
jne 0x10108b3c
mov eax, dword [esi + 0xc]
mov byte [eax + 8], 0
jmp 0x10108b52
lea edx, [edi + 0x14]
call fcn.100f5870
test eax, eax
je 0x10108bd7
mov edi, dword [ebp + 8]
mov ebx, 1
mov eax, dword [esp + 0x18]
mov dword [esp + 0x14], edi
dec eax
mov dword [esp + 0x18], eax
test ebx, ebx
je 0x101088ba
mov edx, edi
mov ecx, esi
call fcn.100f5800
mov dl, byte [eax + 8]
test dl, 0xf
jne 0x10108948
mov ecx, dword [esi + 0x10]
add ecx, 0x38
cmp eax, ecx
je 0x10108a39
and dl, 0xf
cmp dl, 3
jne 0x10108a39
lea eax, [esp + 0x1c]
mov edx, edi
push eax
mov ecx, esi
call fcn.100f5cb0
add esp, 4
mov ebx, eax
cmp dword [esp + 0x1c], 0
je 0x10108be7
test ebx, ebx
jne 0x101089cf
mov ebx, dword [esp + 0x10]
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
add esp, 4
mov dword [esp + 0x14], eax
push ebx
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ungetc]
add esp, 8
mov edx, 0x1035264c
mov ecx, esi
call fcn.10117960
mov ecx, dword [esi + 0xc]
mov dword [ecx], eax
mov al, byte [eax + 4]
or al, 0x40
mov byte [ecx + 8], al
mov eax, dword [esi + 0x10]
add dword [esi + 0xc], 0x10
cmp dword [eax + 0xc], 0
jle 0x101089c0
mov ecx, esi
call fcn.101074c0
xor ebx, ebx
cmp dword [esp + 0x14], 0xffffffff
setne bl
jmp 0x10108b26
lea eax, [esp + 0x38]
mov dword [esp + 0x34], esi
mov dword [esp + 0x28], eax
lea ecx, [esp + 0x28]
mov eax, dword [esi + 0xc]
mov edx, ebx
mov dword [esp + 0x30], 0
mov dword [esp + 0x2c], 0x200
push 0xffffffffffffffff
mov dword [eax], ecx
mov byte [eax + 8], 2
add dword [esi + 0xc], 0x10
call fcn.100f8440
add esp, 4
push dword [esp + 0x10]
push ebx
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
lea ecx, [esp + 0x28]
mov edi, eax
add dword [esp + 0x30], edi
call fcn.100f86b0
xor eax, eax
cmp eax, edi
mov edi, dword [esp + 0x14]
sbb ebx, ebx
neg ebx
jmp 0x10108b26
push 0
mov edx, edi
mov ecx, esi
call fcn.100f5dc0
add esp, 4
test eax, eax
je 0x10108bfe
mov cl, byte [eax]
cmp cl, 0x2a
jne 0x10108a59
mov cl, byte [eax + 1]
movsx eax, cl
add eax, 0xffffffb4
cmp eax, 0x22
ja case.0x10108a6f.77
movzx eax, byte [eax + 0x10108c20]
jmp dword [eax*4 + 0x10108c0c]
mov edx, dword [esp + 0x10]
mov ecx, esi
call fcn.10108380
mov ebx, eax
jmp 0x10108b26
mov edx, dword [esp + 0x10]
mov ecx, esi
push 1
call fcn.10108700
add esp, 4
mov ebx, eax
jmp 0x10108b26
mov edx, dword [esp + 0x10]
mov ecx, esi
push 0
call fcn.10108700
add esp, 4
mov ebx, eax
jmp 0x10108b26
mov edi, dword [esp + 0x10]
lea eax, [esp + 0x38]
mov dword [esp + 0x28], eax
lea ecx, [esp + 0x28]
mov eax, dword [esi + 0xc]
mov dword [esp + 0x34], esi
mov dword [esp + 0x30], 0
mov dword [esp + 0x2c], 0x200
mov dword [eax], ecx
mov byte [eax + 8], 2
add dword [esi + 0xc], 0x10
push 0xffffffffffffffff
mov edx, 0x200
lea ecx, [esp + 0x2c]
call fcn.100f8440
add esp, 4
push edi
push 0x200
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add dword [esp + 0x40], eax
add esp, 0x10
cmp eax, 0x200
je 0x10108ae4
mov edi, dword [esp + 0x14]
lea ecx, [esp + 0x28]
call fcn.100f86b0
mov ebx, 1
mov eax, dword [esp + 0x18]
inc edi
mov dword [esp + 0x14], edi
test eax, eax
jne 0x10108920
jmp 0x101088ba
mov edx, eax
mov ecx, esi
call fcn.10117960
mov ecx, dword [esi + 0xc]
mov dword [ecx], eax
mov al, byte [eax + 4]
or al, 0x40
mov byte [ecx + 8], al
mov ecx, dword [esi + 0x10]
add dword [esi + 0xc], 0x10
cmp dword [ecx + 0xc], 0
jle 0x10108b66
mov ecx, esi
call fcn.101074c0
mov ecx, dword [esi + 0xc]
mov eax, edi
cdq
mov dword [ecx], eax
mov eax, 3
mov dword [ecx + 4], edx
mov byte [ecx + 8], 3
add dword [esi + 0xc], 0x10
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x230]
xor ecx, esp
call fcn.102bb91c
mov esp, ebp
pop ebp
ret
test ebx, ebx
jne 0x10108bbd
mov ebx, dword [esi + 0xc]
sub ebx, 0x10
cmp dword [esi + 0x24], ebx
jb 0x10108bb2
push 0
push 0xffffffffffffffff
mov edx, ebx
mov ecx, esi
call fcn.10103b90
add esp, 8
mov dword [esi + 0xc], ebx
mov byte [ebx + 8], 0
add dword [esi + 0xc], 0x10
sub edi, dword [ebp + 8]
mov ecx, dword [esp + 0x23c]
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.102bb91c
mov esp, ebp
pop ebp
ret
push str.too_many_arguments
push str.stack_overflow___s_
push esi
call fcn.100f7da0
mov edx, edi
mov ecx, esi
call fcn.100f8280
push str.invalid_format
mov edx, edi
mov ecx, esi
call fcn.100f7970
push 4
mov edx, edi
mov ecx, esi
call fcn.100f7c90
nop dword [eax]
lahf
mov dl, byte [eax]
adc byte [ebx - 0x77efef76], dh
mov dl, byte [eax]
adc byte [esi - 0x76], dh
adc byte [eax], dl
invalid