Function at 0x10016fd0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0xa8
mov ebp, dword [esp + 0xbc]
mov edi, ecx
mov dword [esp + 4], edx
mov eax, dword [ebp + 8]
mov ecx, dword [ebp]
mov esi, dword [ebp + 4]
mov edx, dword [eax + 4]
cmp ecx, edx
sbb esi, 0
jae 0x10017029
cmp edx, ecx
je 0x10017029
jb 0x100175d7
mov eax, dword [eax]
mov edx, ebp
mov bl, byte [eax + ecx]
lea ecx, [esp + 0x10]
push 7
call fcn.10012fe0
add esp, 4
mov eax, dword [esp + 0x10]
cmp al, 1
jne 0x10017039
mov byte [edi + 1], ah
mov byte [edi], 1
jmp 0x1001702e
mov word [edi], 1
add esp, 0xa8
pop esi
pop edi
pop ebx
pop ebp
ret
mov esi, dword [esp + 0x14]
mov dword [esp + 0x38], edi
mov dword [esp + 0x58], esi
mov eax, dword [ebp + 8]
mov edi, dword [ebp]
mov ecx, dword [ebp + 4]
xor ebp, ebp
mov dword [esp], eax
mov eax, dword [eax + 4]
mov edx, edi
mov dword [esp + 0xc], edi
sub edx, eax
neg edx
cmp edi, eax
mov edi, ecx
sbb edi, 0
cmovb ebp, edx
cmp ebp, esi
jae 0x10017222
mov eax, dword [0x104debf8]
cmp eax, 5
jb 0x10017081
mov eax, dword [0x104debfc]
mov eax, dword [0x104d53e8]
mov ebx, dword [esp + 0x38]
mov ebp, dword [esp + 0xbc]
dec eax
cmp eax, 5
jb 0x10017218
mov ecx, dword [0x104d4828]
test ecx, ecx
je 0x10017218
mov al, 1
cmp ecx, 1
je 0x100170bb
cmp ecx, 2
jne 0x1001747e
mov al, 2
movzx edx, al
mov ecx, 0x104d4828
call fcn.10109d10
test al, al
je 0x10017218
mov ecx, dword [0x104d482c]
mov eax, dword [ecx + 0x30]
test eax, eax
je 0x10017581
mov edi, dword [ecx + 0x2c]
mov edx, dword [ecx + 0x34]
mov esi, dword [ecx + 0x38]
cmp eax, 1
mov dword [esp + 0x94], 0
mov dword [esp + 0x3c], 0x103ef5f0
mov dword [esp + 0x40], 1
mov dword [esp + 0x44], 0
mov dword [esp + 0x4c], str.formatter_errorfailed_to_write_whole_buffer
mov dword [esp + 0x50], 0
mov dword [esp + 0x98], edi
mov dword [esp + 0x9c], eax
mov dword [esp + 0xa0], edx
mov dword [esp + 0xa4], esi
je 0x10017581
cmp eax, 2
mov dword [esp + 0x74], 1
mov dword [esp + 0x78], edi
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], edx
mov dword [esp + 0x84], esi
jbe 0x10017581
mov dword [esp + 0x5c], 2
mov dword [esp + 0x60], edi
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], edx
mov dword [esp + 0x6c], esi
xor edi, edi
mov eax, dword [ebp + 8]
mov edx, dword [ebp]
mov eax, dword [eax + 4]
mov esi, edx
sub esi, eax
neg esi
cmp edx, eax
mov eax, dword [ebp + 4]
lea edx, [esp + 0x3c]
sbb eax, 0
lea eax, [esp + 0x94]
cmovb edi, esi
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
lea esi, [esp + 0x74]
lea edx, [esp + 0x58]
mov dword [esp + 0x18], 0x103eee6c
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], edx
lea esi, [esp + 0x5c]
lea edx, [esp + 0x70]
mov dword [esp + 0x24], 0x103eee94
mov dword [esp + 0x70], edi
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], edx
lea esi, [esp + 0x10]
lea edx, [ecx + 0x2c]
mov dword [esp + 0x30], 0x103eee94
mov dword [esp + 0x88], esi
mov dword [esp + 0x8c], 3
mov dword [esp + 0x90], edx
lea edx, [esp + 0x88]
call fcn.1010a570
mov word [ebx], 0x201
jmp 0x1001702e
mov ebp, esi
test bl, bl
js 0x1001725e
mov edx, dword [esp + 0xbc]
lea ecx, [esp + 0x10]
push ebp
call fcn.10013920
add esp, 4
movsd xmm0, qword [esp + 0x10]
mov eax, dword [esp + 0x38]
movsd xmm1, qword [esp + 0x18]
movsd qword [eax + 0xc], xmm1
movsd qword [eax + 4], xmm0
mov byte [eax], 0
jmp 0x1001702e
mov esi, dword [esp + 0xc]
cmp esi, eax
sbb ecx, 0
jae 0x1001727a
cmp eax, esi
mov ecx, esi
jb 0x100175d5
mov eax, dword [esp]
add ecx, dword [eax]
jmp 0x10017281
xor edx, edx
mov ecx, str.formatter_errorfailed_to_write_whole_buffer
cmp edx, ebp
jb 0x10017592
mov ebx, dword [esp + 4]
lea edx, [ebp + ebp]
mov esi, ecx
mov edi, dword [ebx + 0x2c]
lea eax, [ebx + 0x24]
mov dword [esp + 8], eax
sub edi, dword [ebx + 0x28]
cmp edi, edx
jae 0x100172ad
mov ecx, dword [esp + 8]
call fcn.10007e40
test ebp, ebp
je 0x100173e9
mov ecx, esi
mov esi, dword [esp + 4]
xor edi, edi
lea eax, [esi + 0x2c]
mov dword [esp + 0x54], eax
jmp 0x100172e2
mov edi, dword [edi + ebp*8 + 0x103ef618]
mov ebp, dword [esp]
inc ecx
dec ebp
je 0x100173db
cmp edi, 0x100
jae 0x10017513
movzx ebx, byte [ecx]
shl edi, 7
mov dl, 1
mov dword [esp + 0x34], edx
shr ebx, 4
movzx eax, byte [edi + ebx*8 + 0x103ef61d]
test al, 4
jne 0x100173e4
test al, 2
mov dword [esp + 0xc], ecx
je 0x1001735f
mov eax, dword [esi + 0x28]
movzx edx, byte [edi + ebx*8 + 0x103ef61c]
cmp dword [esi + 0x2c], eax
jne 0x10017341
mov ecx, dword [esp + 8]
mov byte [esp], dl
mov edx, 1
call fcn.10007e40
mov esi, dword [esp + 4]
movzx edx, byte [esp]
mov eax, dword [esi + 0x28]
mov ecx, dword [esi + 0x24]
mov byte [ecx + eax], dl
mov eax, dword [esi + 0x28]
inc eax
mov dword [esp + 0x5c], eax
cmp eax, dword [esi + 0x2c]
ja 0x10017529
mov ecx, dword [esp + 0xc]
mov dword [esi + 0x28], eax
mov edi, dword [edi + ebx*8 + 0x103ef618]
mov dword [esp], ebp
cmp edi, 0xff
ja 0x10017513
movzx ebp, byte [ecx]
shl edi, 7
and ebp, 0xf
movzx ebx, byte [edi + ebp*8 + 0x103ef61d]
test bl, 4
jne 0x100173e4
test bl, 2
je 0x100172d0
mov eax, dword [esi + 0x28]
mov bh, byte [edi + ebp*8 + 0x103ef61c]
cmp dword [esi + 0x2c], eax
jne 0x100173b8
mov ecx, dword [esp + 8]
mov edx, 1
call fcn.10007e40
mov esi, dword [esp + 4]
mov eax, dword [esi + 0x28]
mov ecx, dword [esi + 0x24]
mov byte [ecx + eax], bh
mov eax, dword [esi + 0x28]
inc eax
mov dword [esp + 0x5c], eax
cmp eax, dword [esi + 0x2c]
ja 0x10017529
mov ecx, dword [esp + 0xc]
mov dword [esi + 0x28], eax
jmp 0x100172d0
test bl, 1
jne 0x100173e9
test edi, edi
je 0x100173e9
jmp 0x100174cc
mov eax, dword [esp + 4]
mov edx, dword [esp + 8]
lea ecx, [esp + 0x10]
push dword [eax + 0x28]
call fcn.10007ce0
add esp, 4
mov ebx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x10]
mov esi, dword [esp + 0x14]
test bl, 1
jne 0x10017423
mov edi, 0x103e6c20
mov dword [esp + 0x34], 0
jmp 0x100174cc
mov ecx, dword [esp + 0x18]
shr ebx, 5
sub ebp, ebx
add ecx, ebx
add esi, ebx
je 0x10017457
cmp ecx, esi
jbe 0x10017495
call sub.KERNEL32.dll_GetProcessHeap
push esi
push ebp
push 0
push eax
call sub.KERNEL32.dll_HeapReAlloc
test eax, eax
jne 0x10017497
mov ecx, esi
mov edx, 1
call fcn.10006540
ud2
xor esi, esi
mov edi, 0x10419114
mov eax, str.formatter_errorfailed_to_write_whole_buffer
test ecx, ecx
je 0x1001747a
call sub.KERNEL32.dll_GetProcessHeap
push ebp
push 0
push eax
call sub.KERNEL32.dll_HeapFree
mov eax, str.formatter_errorfailed_to_write_whole_buffer
xor edx, edx
jmp 0x100174ae
mov ecx, 0x104d4828
call fcn.10109c60
test al, al
jne 0x100170bb
jmp 0x10017218
mov eax, ebp
test al, 1
jne 0x100174a7
mov edx, eax
mov edi, 0x103e6c08
or edx, 1
jmp 0x100174ae
mov edi, 0x103e6c18
mov edx, eax
mov ecx, esi
mov dword [esp + 0x74], ebx
sub ecx, ebx
jb 0x100175e6
add eax, ebx
mov esi, ecx
mov ebx, edx
mov dword [esp + 0x34], 0
mov ebp, eax
mov edx, dword [esp + 0xbc]
mov eax, dword [edx]
add eax, dword [esp + 0x58]
jb 0x100175a3
mov ecx, dword [edx + 8]
cmp eax, dword [ecx + 4]
ja 0x100175bc
mov dword [edx], eax
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
mov dword [edx + 4], 0
mov byte [eax], cl
mov byte [eax + 1], 6
mov dword [eax + 4], ebp
mov dword [eax + 8], esi
mov dword [eax + 0xc], ebx
mov dword [eax + 0x10], edi
jmp 0x1001702e
mov ecx, edi
mov edx, 0x100
push 0x103f7618
call fcn.10008300
add esp, 4
ud2
mov edx, dword [esp + 0x54]
lea eax, [esp + 0x5c]
lea ecx, [esp + 0x3c]
mov dword [esp + 0x10], 0x1041b828
mov dword [esp + 0x14], 2
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], ecx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], fcn.10008370
lea ecx, [esp + 0x10]
mov dword [esp + 0x24], 2
mov dword [esp + 0x44], edx
mov edx, 0x1041b838
mov dword [esp + 0x48], fcn.10008370
call fcn.10008470
ud2
mov ecx, 0x1041992d
mov edx, 0x22
push 0x103ef5f8
jmp 0x100175b2
mov ecx, ebp
push 0x103ef608
call fcn.100088f0
add esp, 4
ud2
mov ecx, 0x1042575c
mov edx, 8
push 0x10425764
call fcn.1000a730
add esp, 4
ud2
mov ecx, 0x104254de
mov edx, 0x36
push 0x10425514
call fcn.100082b0
add esp, 4
ud2
mov edx, eax
push 0x1042573c
call fcn.100098e0
add esp, 4
ud2
lea eax, [esp + 0x74]
lea edx, [esp + 0x5c]
lea ecx, [esp + 0x3c]
mov dword [esp + 0x10], 0x104255c4
mov dword [esp + 0x14], 2
mov dword [esp + 0x18], 0
mov dword [esp + 0x5c], esi
mov dword [esp + 0x20], ecx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], 0x10010ea0
mov dword [esp + 0x44], edx
lea ecx, [esp + 0x10]
mov edx, 0x1041ad2c
mov dword [esp + 0x48], 0x10010ea0
mov dword [esp + 0x24], 2
call fcn.10008470
ud2