Function at 0x101d165
Capabilities:
Terminate process

Disassembly:
mov eax, 0x1030f0a
call fcn.01010a18
sub esp, 0x10
mov eax, dword [ebp + 8]
push ebx
push esi
xor ebx, ebx
cmp eax, ebx
mov esi, ecx
push edi
mov dword [ebp - 0x10], ebx
mov dword [esi + 0x50], eax
jne 0x101d1a4
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push 0x1003f64
push eax
call dword [sym.imp.msvcrt.dll_fprintf]
pop ecx
pop ecx
push 1
call dword [sym.imp.msvcrt.dll_exit]
cmp dword [esi + 0xc], ebx
je case.0x101d40c.2
mov eax, dword [esi + 0x14]
or dword [esi + 0x30], 0xffffffff
mov dword [esi + 0x1c], eax
mov eax, dword [esi + 0x18]
mov dword [esi + 0x20], eax
mov eax, dword [esi + 0x48]
mov dword [esi + 0x38], ebx
mov dword [esi + 0x34], ebx
mov dword [esi + 0x4c], eax
mov word [esi + 0x12], 0x1f
mov dword [esi + 0xc], ebx
jmp 0x101d236
movsx eax, word [esi + 0x10]
movsx eax, word [eax*2 + 0x1037d40]
mov edx, dword [esi + 0x1c]
mov dx, word [edx]
lea eax, [eax*2 + 0x1037d00]
mov ecx, eax
inc eax
inc eax
mov word [esi + 0x10], dx
mov dx, word [eax]
inc eax
inc eax
cmp word [esi + 0x10], dx
jl 0x101d1f1
mov dx, word [esi + 0x10]
dec eax
dec eax
cmp dx, word [eax]
jne 0x101d213
mov edx, ecx
sub edx, eax
sar edx, 1
mov ax, word [ecx + edx*2]
jmp 0x101d218
xor eax, eax
mov ax, word [ecx]
cmp dword [esi + 0x54], ebx
not eax
mov word [esi + 0x12], ax
je 0x101d236
mov eax, dword [esi]
mov ecx, esi
mov dword [esi + 0x3c], ebx
call dword [eax + 0x10]
cmp dword [esi + 0x3c], ebx
jne 0x101d630
add dword [esi + 0x1c], 2
mov ecx, dword [esi + 8]
mov edx, dword [esi + 0x14]
mov eax, dword [esi + 0x1c]
lea ecx, [edx + ecx*2]
cmp eax, ecx
ja 0x101d5df
mov cx, word [esi + 0x12]
mov word [eax], cx
add dword [esi + 0x20], 4
mov eax, dword [esi + 0x20]
mov ecx, dword [esi + 0x28]
mov dword [eax], ecx
cmp dword [esi + 0x54], ebx
je 0x101d287
add dword [esi + 0x4c], 2
mov eax, dword [esi + 0x4c]
mov cx, word [ebp - 0x10]
mov word [eax], cx
mov eax, dword [esi]
mov ecx, esi
mov dword [esi + 0x3c], ebx
call dword [eax + 8]
cmp dword [esi + 0x3c], ebx
jne 0x101d630
xor eax, eax
mov ax, word [esi + 0x12]
cmp ax, 0x20
jb 0x101d29b
add eax, 0xffffffe4
jmp 0x101d389
movsx eax, ax
movsx edi, word [eax*2 + 0x1037cc0]
lea edi, [edi*2 + 0x1037be0]
cmp word [edi], bx
jl 0x101d309
cmp dword [esi + 0x30], ebx
jge 0x101d2e6
mov ecx, dword [esi + 0x50]
call fcn.0101b735
cmp eax, ebx
mov dword [esi + 0x30], eax
jge 0x101d2d2
cmp eax, 0xfffffffe
je 0x101d5ef
mov dword [esi + 0x30], ebx
cmp dword [esi + 0x54], ebx
mov eax, dword [0x103ba28]
mov dword [esi + 0x24], eax
je 0x101d2e6
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov cx, word [esi + 0x30]
mov eax, edi
mov word [esi + 0x10], cx
mov cx, word [edi]
inc edi
inc edi
cmp word [esi + 0x10], cx
jl 0x101d2f0
mov cx, word [esi + 0x10]
cmp cx, word [edi - 2]
je 0x101d488
mov ax, word [esi + 0x12]
cmp ax, 8
jae case.0x101d40c.1
movsx eax, ax
mov ax, word [eax*2 + 0x1037bac]
cmp ax, bx
mov word [esi + 0x10], ax
jge 0x101d38d
cmp dword [esi + 0x30], ebx
movsx edi, ax
not edi
lea edi, [edi*2 + 0x1037bbc]
jge 0x101d379
mov ecx, dword [esi + 0x50]
call fcn.0101b735
cmp eax, ebx
mov dword [esi + 0x30], eax
jge 0x101d357
cmp eax, 0xfffffffe
je 0x101d5ef
mov dword [esi + 0x30], ebx
cmp dword [esi + 0x54], ebx
mov eax, dword [0x103ba28]
mov dword [esi + 0x24], eax
je 0x101d379
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
jmp 0x101d379
movsx eax, word [esi + 0x10]
cmp eax, dword [esi + 0x30]
je 0x101d385
add edi, 4
mov ax, word [edi]
cmp ax, bx
mov word [esi + 0x10], ax
jge 0x101d36d
mov ax, word [edi + 2]
mov word [esi + 0x10], ax
cmp dword [esi + 0x54], ebx
movsx eax, word [esi + 0x10]
movsx edi, word [eax*2 + 0x1037d98]
je 0x101d3c4
movsx eax, word [esi + 0x10]
mov dword [esi + 0x40], eax
mov eax, dword [esi]
mov ecx, esi
mov dword [esi + 0x44], edi
mov dword [esi + 0x3c], ebx
call dword [eax + 0xc]
cmp dword [esi + 0x3c], ebx
jne 0x101d630
mov eax, edi
neg eax
shl eax, 1
add dword [esi + 0x4c], eax
mov eax, edi
neg eax
shl eax, 1
add dword [esi + 0x1c], eax
mov eax, dword [esi + 0x20]
mov ecx, edi
shl ecx, 2
mov dword [esi + 0x2c], eax
sub eax, ecx
cmp dword [esi + 0x54], ebx
mov dword [esi + 0x20], eax
mov eax, dword [eax + 4]
mov dword [esi + 0x28], eax
je 0x101d3ff
movsx eax, word [esi + 0x10]
movsx eax, word [eax*2 + 0x1037e38]
movsx eax, word [eax*8 + 0x10378c4]
mov dword [ebp - 0x10], eax
movsx eax, word [esi + 0x10]
cmp eax, 8
ja case.0x101d40c.2
jmp dword [eax*4 + 0x101d635]
mov eax, dword [esi + 0x34]
cmp eax, ebx
je 0x101d45c
jle 0x101d5ef
cmp eax, 2
jle 0x101d4db
cmp eax, 3
jne 0x101d5ef
cmp dword [esi + 0x30], ebx
je 0x101d5ef
cmp dword [esi + 0x54], ebx
je 0x101d453
mov eax, dword [esi]
mov ecx, esi
mov dword [esi + 0x3c], ebx
call dword [eax + 0x1c]
cmp dword [esi + 0x3c], ebx
jne 0x101d630
or dword [esi + 0x30], 0xffffffff
jmp 0x101d287
mov ax, word [esi + 0x30]
inc dword [esi + 0x38]
mov word [esi + 0x10], ax
mov eax, dword [esi + 0x50]
mov ecx, dword [eax]
push 0x1003f54
push eax
call dword [ecx + 8]
movsx eax, word [esi + 0x10]
cmp eax, dword [esi + 0x30]
pop ecx
pop ecx
je 0x101d4db
inc dword [esi + 0x34]
jmp 0x101d287
mov ecx, eax
sub ecx, edi
sar ecx, 1
cmp dword [esi + 0x54], ebx
mov ax, word [eax + ecx*2]
not ax
mov word [esi + 0x12], ax
je 0x101d4bd
push dword [esi + 0x30]
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
mov dword [ebp - 0x10], eax
mov eax, dword [esi]
mov ecx, esi
mov dword [esi + 0x3c], ebx
call dword [eax + 0x14]
cmp dword [esi + 0x3c], ebx
jne 0x101d630
mov eax, dword [esi + 0x24]
or dword [esi + 0x30], 0xffffffff
mov dword [esi + 0x28], eax
mov eax, dword [esi + 0x34]
cmp eax, ebx
je 0x101d236
dec eax
mov dword [esi + 0x34], eax
jmp 0x101d236
mov dword [esi + 0x34], 3
mov ecx, dword [esi + 0x1c]
mov edi, dword [esi + 0x14]
cmp ecx, edi
jbe 0x101d5ef
mov ax, word [ecx]
cmp ax, 0x20
jae 0x101d542
movsx eax, ax
movsx eax, word [eax*2 + 0x1037cc0]
lea eax, [eax*2 + 0x1037be0]
mov edx, eax
mov bx, word [eax]
inc eax
inc eax
cmp bx, 0x100
jg 0x101d50d
cmp word [eax - 2], 0x100
je 0x101d550
xor ebx, ebx
cmp dword [esi + 0x54], ebx
je 0x101d542
add edi, 2
cmp ecx, edi
jbe 0x101d542
mov eax, dword [esi]
mov ecx, esi
mov dword [esi + 0x3c], ebx
call dword [eax + 0x18]
cmp dword [esi + 0x3c], ebx
jne 0x101d630
add dword [esi + 0x1c], 0xfffffffe
add dword [esi + 0x20], 0xfffffffc
add dword [esi + 0x4c], 0xfffffffe
jmp 0x101d4e2
mov ecx, edx
sub ecx, eax
sar ecx, 1
mov ax, word [edx + ecx*2]
not ax
mov word [esi + 0x12], ax
xor ebx, ebx
jmp 0x101d236
mov eax, dword [esi + 0x2c]
push ecx
mov ecx, esp
mov dword [ebp - 0x14], esp
push dword [eax - 0xc]
call fcn.01010ff5
mov dword [ebp - 4], 1
jmp 0x101d59a
mov eax, dword [esi + 0x2c]
push ecx
mov ecx, esp
mov dword [ebp - 0x18], esp
push dword [eax - 0xc]
call fcn.01010ff5
mov dword [ebp - 4], 2
or dword [ebp - 4], 0xffffffff
mov ecx, esi
call fcn.0101d12c
mov eax, dword [esi + 0x2c]
push dword [eax - 0xc]
jmp 0x101d5d4
mov eax, dword [esi + 0x2c]
push ecx
mov ecx, esp
mov dword [ebp - 0x1c], esp
push dword [eax]
call fcn.01010ff5
mov dword [ebp - 4], 3
or dword [ebp - 4], 0xffffffff
mov ecx, esi
call fcn.0101d12c
mov eax, dword [esi + 0x2c]
push dword [eax]
call fcn.010106e8
pop ecx
jmp case.0x101d40c.2
mov esi, dword [esi + 0x50]
mov eax, dword [esi]
push 0x1003f3c
push esi
call dword [eax + 8]
pop ecx
pop ecx
xor eax, eax
inc eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 4
mov eax, dword [esi + 0x2c]
push dword [eax - 0x10]
lea ecx, [ebp + 8]
call fcn.01010ff5
mov dword [ebp - 4], ebx
lea eax, [ebp + 8]
push eax
lea ecx, [esi + 0x58]
call fcn.0101107e
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.01010f73
xor eax, eax
jmp 0x101d5f2
or eax, 0xffffffff
jmp 0x101d5f2