Function at 0x101fd39
Capabilities:
Map section object

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x16c
push ebx
mov ebx, dword [ebp + 0x18]
cmp dword [ebx], 0
jne 0x101fa45
xor eax, eax
jmp 0x101ff19
mov ecx, dword [ebp + 0x10]
and dword [ebp - 8], 0
push esi
movzx eax, cx
push edi
mov edi, dword [ebp + 8]
movzx esi, word [edi + 8]
mov edx, ecx
shr edx, 0x10
cmp cx, si
mov dword [ebp - 4], eax
movzx eax, dx
mov dword [ebp - 0x10], eax
jge 0x101ff12
test cx, cx
jl 0x101ff12
movzx ecx, word [edi + 0xa]
cmp ax, cx
jge 0x101ff12
test ax, ax
jl 0x101ff12
movsx eax, word [edi + 0x44]
movsx edx, dx
add eax, edx
cdq
movsx ecx, cx
idiv ecx
or dword [edi + 0x68], 1
movzx eax, dx
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0x14]
cmp eax, 1
jne 0x101fba0
test byte [edi], 4
je 0x101fad6
test byte [0x10382f8], al
jne 0x101fad6
mov eax, dword [0x1038044]
cmp dword [0x1038334], eax
je 0x101fadb
mov dword [ebp + 8], 0x4e4
jmp 0x101fade
mov eax, dword [0x1038334]
mov dword [ebp + 8], eax
mov ecx, dword [ebx]
cmp ecx, 1
jne 0x101fb60
mov eax, dword [ebp + 0xc]
movzx eax, byte [eax]
and dword [ebp - 0x14], 0
push eax
push dword [ebp + 8]
call fcn.0101c423
movzx eax, ax
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x2c]
mov dword [ebp + 0xc], eax
movsx esi, word [ebp - 0xc]
movzx eax, word [ebp - 4]
imul esi, esi, 0x1c
add esi, dword [edi + 0x3c]
movsx ebx, word [ebp - 4]
mov ecx, dword [ebp + 0x18]
mov ecx, dword [ecx]
sub ecx, dword [ebp - 8]
mov dword [ebp + 8], eax
mov eax, dword [esi + 8]
lea edx, [eax + ebx*2]
movsx eax, word [edi + 8]
sub eax, ebx
cmp eax, ecx
jb 0x101fdc3
lea eax, [ecx + ecx]
push eax
push dword [ebp + 0xc]
push edx
call dword [sym.imp.msvcrt.dll_memmove]
mov edx, dword [ebp + 0x18]
mov ax, word [edx]
sub ax, word [ebp - 8]
add esp, 0xc
dec ax
add word [ebp - 4], ax
mov eax, dword [edx]
mov dword [ebp - 8], eax
jmp 0x101fdf2
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
add ecx, ecx
push ecx
push dword [0x1038030]
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov esi, eax
mov dword [ebp - 0x14], esi
test esi, esi
je 0x101fdac
mov eax, dword [ebx]
push eax
push esi
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0101c331
mov dword [ebp + 0xc], esi
jmp 0x101fb04
cmp eax, 2
jne 0x101fbd0
test byte [edi], 4
je 0x101fb04
test byte [0x10382f8], 1
jne 0x101fb04
push dword [0x1038334]
push dword [ebx]
push dword [ebp + 0xc]
call fcn.01004dfe
jmp 0x101fb04
cmp eax, 4
je 0x101fb04
cmp eax, 3
jne 0x101fdb6
cmp si, 0x50
mov eax, dword [ebp + 0xc]
lea edx, [ebp - 0x16c]
mov dword [ebp - 0x18], eax
mov dword [ebp + 0x14], edx
jle 0x101fc23
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
movsx ecx, si
shl ecx, 2
push ecx
push dword [0x1038030]
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov dword [ebp + 0x14], eax
test eax, eax
je 0x101fdac
mov edx, eax
movsx ebx, word [ebp - 0xc]
imul ebx, ebx, 0x1c
add ebx, dword [edi + 0x3c]
xor ecx, ecx
mov word [edx], cx
mov ecx, dword [ebp - 0x18]
mov cx, word [ecx]
mov word [edx + 2], cx
mov cx, word [ebp - 4]
movzx esi, cx
mov eax, edx
mov dword [ebp + 0xc], 1
mov dword [ebp - 0x14], esi
jmp 0x101fc90
mov si, word [eax + 2]
mov ecx, dword [ebp - 0x18]
cmp si, word [ecx]
jne 0x101fc62
inc word [eax]
jmp 0x101fc75
xor esi, esi
add eax, 4
inc esi
inc dword [ebp + 0xc]
mov word [eax], si
mov cx, word [ecx]
mov word [eax + 2], cx
inc dword [ebp - 8]
mov ecx, dword [ebp + 0x18]
mov esi, dword [ebp - 8]
inc dword [ebp - 4]
cmp esi, dword [ecx]
je 0x101fc96
inc dword [ebp - 0x14]
add dword [ebp - 0x18], 2
mov cx, word [ebp - 0x14]
cmp cx, word [edi + 8]
jl 0x101fc51
movzx eax, word [ebx + 0x10]
dec dword [ebp - 4]
cmp word [ebp + 0xc], ax
jne 0x101fcb8
movsx ecx, word [ebp + 0xc]
mov esi, dword [ebx + 0x18]
shl ecx, 2
mov edi, edx
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
mov edi, dword [ebp + 8]
je 0x101fd2d
mov esi, dword [ebp - 0x10]
xor eax, eax
cmp si, word [ebp + 0x12]
push edi
setne al
push ebx
push dword [ebp - 4]
dec eax
and eax, dword [ebp + 0x10]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x28]
push eax
push dword [ebp + 0xc]
movzx eax, word [ebx + 0x10]
push edx
push eax
push dword [ebx + 0x18]
call fcn.0101cba6
test eax, eax
jl 0x101fd7e
cmp word [ebx + 0x10], 1
jle 0x101fd0d
push dword [ebx + 0x18]
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push 0
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp + 0x14]
mov dword [ebx + 0x18], eax
mov ax, word [ebp - 0x1c]
mov word [ebx + 0x10], ax
mov eax, 0xffffffff
mov word [ebx + 6], ax
or eax, eax
mov word [ebx + 2], ax
movzx eax, word [edi + 0xa]
inc dword [ebp - 0xc]
cmp word [ebp - 0xc], ax
jne 0x101fd3e
and dword [ebp - 0xc], 0
mov ecx, dword [ebp - 8]
mov esi, dword [ebp + 0x18]
cmp ecx, dword [esi]
jae 0x101fd59
and dword [ebp - 4], 0
inc dword [ebp - 0x10]
cmp word [ebp - 0x10], ax
jl 0x101fc23
push dword [ebp - 0x10]
push dword [ebp - 4]
push dword [ebp + 0x12]
push dword [ebp + 0x10]
push edi
call fcn.01001fef
cmp word [edi + 8], 0x50
jle 0x101fea6
push dword [ebp + 0x14]
jmp 0x101fe92
cmp word [edi + 8], 0x50
jle 0x101fd9c
push dword [ebp + 0x14]
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push 0
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
push esi
push dword [ebp - 4]
push dword [ebp + 0x12]
push dword [ebp + 0x10]
push edi
call fcn.01001fef
mov eax, 0xc0000017
jmp 0x101ff17
and dword [ebx], 0
mov eax, 0xc000000d
jmp 0x101ff17
add eax, eax
push eax
push dword [ebp + 0xc]
push edx
call dword [sym.imp.msvcrt.dll_memmove]
movzx ecx, word [edi + 8]
mov edx, dword [ebp + 0xc]
movsx eax, cx
sub eax, ebx
add dword [ebp - 8], eax
add esp, 0xc
lea edx, [edx + eax*2]
dec ecx
movzx eax, cx
mov dword [ebp + 0xc], edx
mov edx, dword [ebp + 0x18]
mov dword [ebp - 4], eax
movzx eax, word [esi + 4]
cmp word [ebp + 8], ax
mov word [esi + 6], ax
jge 0x101fe23
movsx ecx, word [edi + 8]
mov eax, dword [esi + 8]
lea ecx, [eax + ecx*2]
lea ebx, [eax + ebx*2]
jmp 0x101fe17
cmp word [ebx], 0x20
jne 0x101fe1b
inc ebx
inc ebx
cmp ebx, ecx
jb 0x101fe0f
sub ebx, eax
sar ebx, 1
mov word [esi + 4], bx
movzx ecx, word [esi]
movsx eax, word [ebp - 4]
mov word [esi + 2], cx
movsx ecx, cx
lea ebx, [eax + 1]
cmp ebx, ecx
jl 0x101fe5a
mov ecx, dword [esi + 8]
movzx ebx, word [ebp - 4]
lea eax, [ecx + eax*2]
jmp 0x101fe50
cmp eax, ecx
jb 0x101fe56
add ebx, 0xffff
dec eax
dec eax
cmp word [eax], 0x20
je 0x101fe44
inc ebx
mov word [esi], bx
movzx eax, word [edi + 0xa]
inc dword [ebp - 0xc]
cmp word [ebp - 0xc], ax
jne 0x101fe6b
and dword [ebp - 0xc], 0
mov ecx, dword [ebp - 8]
cmp ecx, dword [edx]
jae 0x101fe83
and dword [ebp - 4], 0
inc dword [ebp - 0x10]
cmp word [ebp - 0x10], ax
jl 0x101fb04
cmp dword [ebp + 0x14], 1
jne 0x101fea6
cmp dword [ebp - 0x14], 0
je 0x101fea6
push dword [ebp - 0x14]
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push 0
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov eax, dword [ebp + 0x12]
mov esi, dword [ebp - 0x10]
mov word [ebp - 0x22], ax
mov word [ebp - 0x1e], si
cmp si, ax
je 0x101fec7
xor eax, eax
mov word [ebp - 0x24], ax
mov ax, word [edi + 8]
dec ax
jmp 0x101fed3
mov ax, word [ebp + 0x10]
mov word [ebp - 0x24], ax
mov ax, word [ebp - 4]
mov word [ebp - 0x20], ax
lea eax, [ebp - 0x24]
push eax
push edi
call fcn.01002285
mov eax, dword [ebp + 0x1c]
test eax, eax
je 0x101ff08
movsx ecx, word [ebp + 0x12]
movsx edx, si
sub ecx, edx
movsx edx, word [edi + 8]
imul ecx, edx
movsx edx, word [ebp + 0x10]
sub ecx, edx
movsx edx, word [ebp - 4]
lea ecx, [ecx + edx + 1]
mov dword [eax], ecx
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 0x18]
mov dword [ecx], eax
jmp 0x101ff15
and dword [ebx], 0
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x18