Function at 0x10048790
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x2c
mov edi, dword [ebp + 8]
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
lea eax, [ebp - 0x18]
mov dword [ebp - 0x14], 0x1005f0c0
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
xor eax, eax
lea esi, [ebp - 0x30]
nop word cs:[eax + eax]
mov ebx, eax
cmp byte [edi], 0
je 0x100487f7
push 0
push edi
push esi
call fcn.10048350
add esp, 0xc
add edi, eax
mov ecx, dword [ebp - 0x30]
cmp ecx, 0x10000
mov eax, ebx
adc eax, 0
test ecx, ecx
jne 0x100487d0
inc ebx
mov dword [ebp - 0x24], ebx
xor eax, eax
mov edi, dword [ebp + 0xc]
mov edx, eax
cmp byte [edi], 0
je 0x1004882f
push 0
push edi
push esi
mov ebx, esi
mov esi, edx
call fcn.10048350
mov edx, esi
mov esi, ebx
add esp, 0xc
add edi, eax
mov ecx, dword [ebp - 0x30]
cmp ecx, 0x10000
mov eax, edx
adc eax, 0
test ecx, ecx
jne 0x10048800
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x24]
lea ecx, [edx + eax]
inc ecx
cmp ecx, 9
mov eax, 8
mov dword [ebp - 0x38], ecx
cmovge eax, ecx
mov dword [ebp - 0x28], 0
add eax, eax
mov ecx, dword [0x1025afd0]
test ecx, ecx
je 0x10048875
inc dword [ecx + 0x36c]
mov dword [ebp - 0x10], 1
mov ecx, dword [0x1025afd8]
mov dword [ebp - 0x10], 1
push ecx
push eax
call dword [0x101fe77c]
add esp, 8
mov esi, eax
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x24]
lea edi, [esi + eax*2]
add edi, 0xfffffffe
cmp edi, esi
jbe 0x100488e8
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x20]
jmp 0x100488b8
add ebx, eax
mov eax, ebx
cmp esi, edi
jae 0x100488eb
cmp byte [eax], 0
je 0x100488eb
push 0
mov ebx, eax
push eax
lea eax, [ebp - 0x34]
push eax
call fcn.10048350
add esp, 0xc
mov ecx, dword [ebp - 0x34]
test ecx, ecx
je 0x100488e8
cmp ecx, 0xffff
mov edx, dword [ebp - 0x20]
ja 0x100488b0
mov word [esi], cx
add esi, 2
jmp 0x100488b0
mov edx, dword [ebp - 0x20]
mov word [esi], 0
mov eax, dword [ebp - 0x24]
cmp dword [ebp - 0x30], eax
jle 0x100489c2
inc edx
lea esi, [eax + eax]
add esi, dword [ebp - 0x28]
lea edi, [esi + edx*2]
add edi, 0xfffffffe
cmp edi, esi
jbe 0x10048955
mov eax, dword [ebp + 0xc]
jmp 0x10048928
add ebx, eax
mov eax, ebx
cmp esi, edi
jae 0x10048955
cmp byte [eax], 0
je 0x10048955
push 0
mov ebx, eax
push eax
lea eax, [ebp - 0x34]
push eax
call fcn.10048350
add esp, 0xc
mov ecx, dword [ebp - 0x34]
test ecx, ecx
je 0x10048955
cmp ecx, 0xffff
ja 0x10048920
mov word [esi], cx
add esi, 2
jmp 0x10048920
mov word [esi], 0
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x24]
cmp eax, ecx
jle 0x100489c2
test eax, eax
jle 0x100489c2
mov esi, dword [ebp - 0x28]
lea eax, [esi + ecx*2]
push eax
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen]
add esp, 8
test esi, esi
je 0x100489b0
mov dword [ebp - 0x20], eax
mov eax, dword [0x1025afd0]
test eax, eax
je 0x10048996
dec dword [eax + 0x36c]
mov dword [ebp - 0x10], 0
mov eax, dword [0x1025afd8]
mov dword [ebp - 0x10], 0
push eax
push esi
call dword [0x101fe780]
add esp, 8
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x18]
mov dword fs:[0], ecx
add esp, 0x2c
pop esi
pop edi
pop ebx
pop ebp
ret
push 0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
nop word [eax + eax]
push ebp
sub esp, 0xc
add ebp, 0xc
call sub.VCRUNTIME140.dll___std_terminate
nop dword [eax]
push ebp
sub esp, 0xc
add ebp, 0xc
lea ecx, [ebp - 0x30]
call fcn.100481f0
add esp, 0xc
pop ebp
ret