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

Disassembly:
push 0xffffffffffffffff
push 0x10059a88
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x1007fa04]
xor eax, esp
mov dword [esp + 0x58], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x1007fa04]
xor eax, esp
push eax
lea eax, [esp + 0x70]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x80]
mov edi, ecx
cmp byte [edi], 0xa
mov esi, edx
mov dword [esp + 0x20], esi
jne 0x1005019e
push 0x14000040
lea ecx, [esp + 0x3c]
call fcn.10049a20
push eax
mov eax, dword [esi + 4]
mov dword [esp + 0x7c], 0
call eax
mov ecx, dword [esp + 0x3c]
add esp, 4
test ecx, ecx
mov dword [esp + 0x78], 0xffffffff
je 0x1005019e
mov edx, dword [ecx]
mov eax, dword [edx + 0x34]
push 1
call eax
mov cl, byte [edi + 1]
xor ebx, ebx
cmp cl, bl
mov dword [esp + 0x24], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x28], ebx
mov byte [esp + 0x17], cl
jle 0x100501c4
movsx dx, cl
movzx eax, dx
mov dword [esp + 0x24], eax
jmp 0x100501ce
jge 0x100501ce
mov dword [esp + 0x1c], 1
xor eax, eax
mov dword [esp + 0x2c], eax
push esi
lea edx, [esp + 0x30]
mov byte [esp + 0x31], cl
push edx
lea ecx, [esp + 0x4c]
mov dword [esp + 0x3c], eax
push edi
mov dword [esp + 0x3c], eax
mov byte [esp + 0x38], 0x13
mov word [esp + 0x3a], 8
mov dword [esp + 0x40], ecx
call fcn.10051990
mov ecx, dword [esp + 0x54]
mov eax, dword [esp + 0x50]
add esp, 0xc
cmp ecx, ebx
jl 0x10050215
jg 0x10050223
cmp eax, ebx
jae 0x10050223
neg eax
adc ecx, ebx
mov dword [esp + 0x28], 1
neg ecx
lea esi, [esp + 0x4c]
push 0
push 0xa
push ecx
push eax
call fcn.10052f00
add cl, 0x30
mov byte [esi], cl
mov ecx, edx
mov edx, eax
add esi, 1
or edx, ecx
mov dword [esp + 0x40], ebx
jne 0x10050227
mov ax, si
lea ecx, [esp + 0x4c]
sub ax, cx
mov cl, byte [esp + 0x17]
movzx ebx, ax
movsx eax, cl
movsx edx, bx
add edx, eax
test edx, edx
mov dword [esp + 0x18], ebx
jg 0x1005027d
add ebx, 1
movsx edx, bx
mov byte [esi], 0x30
add edx, eax
add esi, 1
test edx, edx
mov dword [esp + 0x18], ebx
jle 0x10050267
mov eax, dword [esp + 0x28]
lea edx, [ebx + eax]
add edx, dword [esp + 0x1c]
mov al, byte [ebp]
add edx, dword [esp + 0x24]
cmp al, 1
movzx edx, dx
mov dword [esp + 0x1c], edx
jne 0x100502a0
cmp dx, word [ebp + 2]
ja 0x100502bc
cmp al, 2
jne 0x100502aa
cmp dx, word [ebp + 2]
jae 0x100502bc
cmp al, 3
jne 0x100502df
movzx eax, word [ebp + 2]
movzx edx, dx
sub eax, 2
cmp edx, eax
jbe 0x100502d1
mov eax, dword [esp + 0x20]
mov ecx, dword [eax + 4]
push ecx
push edi
call fcn.1004f180
mov cl, byte [esp + 0x1f]
add esp, 8
cmp byte [ebp], 3
jne 0x100502df
mov edi, dword [ebp + 8]
add edi, 2
jmp 0x100502e2
mov edi, dword [ebp + 8]
cmp word [esp + 0x28], 0
mov dword [esp + 0x3c], edi
mov edx, 1
je 0x100502f8
mov byte [edi], 0x2d
add edi, edx
test cl, cl
jl 0x10050315
lea esp, [esp]
sub esi, edx
mov al, byte [esi]
sub ebx, edx
mov byte [edi], al
add edi, edx
test bx, bx
mov dword [esp + 0x18], ebx
jne 0x10050300
jmp 0x1005034d
movsx ax, cl
add word [esp + 0x18], ax
mov edi, edi
sub dword [esp + 0x18], edx
sub esi, edx
mov al, byte [esi]
mov byte [edi], al
add edi, edx
cmp word [esp + 0x18], 0
jne 0x10050320
mov byte [edi], 0x2e
add edi, edx
lea esp, [esp]
sub esi, edx
mov al, byte [esi]
mov byte [edi], al
add edi, edx
add cl, 1
jne 0x10050340
mov cl, byte [ebp]
cmp cl, 1
movzx eax, word [ebp + 2]
je 0x1005036a
cmp cl, 2
jne 0x10050362
sub eax, edx
jmp 0x10050365
sub eax, 2
cmp cl, 1
jb 0x10050374
cmp cl, 3
ja 0x10050374
mov cl, byte [ebp + 4]
jmp 0x1005038f
cmp cl, 0x11
je 0x1005037e
cmp cl, 0xa
jne 0x1005038d
cmp word [ebp + 4], dx
jne 0x10050389
mov cl, byte [ebp + 1]
jmp 0x1005038f
mov cl, 1
jmp 0x1005038f
xor cl, cl
movzx ebx, word [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov esi, dword [edx]
movzx cx, cl
push eax
mov eax, dword [esp + 0x40]
push eax
push ebx
push ecx
mov ecx, edx
mov edx, dword [esi + 0xc]
call edx
mov ecx, dword [esp + 0x2c]
push eax
mov eax, dword [esi + 0x14]
call eax
mov eax, dword [esp + 0x24]
test ax, ax
je 0x100503ce
mov byte [edi], 0x30
sub eax, 1
add edi, 1
test ax, ax
jne 0x100503c0
mov al, byte [ebp]
cmp al, 1
jne 0x10050402
movzx eax, word [ebp + 2]
sub eax, ebx
je 0x10050419
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 8]
push ebp
call eax
sub ax, 1
neg ax
sbb eax, eax
and eax, 0x20
push eax
push edi
call sub.MSVCR80.dll_memset
add esp, 0xc
jmp 0x10050419
cmp al, 2
jne 0x1005040b
mov byte [edi], 0
jmp 0x10050419
sub di, word [ebp + 8]
mov ecx, dword [ebp + 8]
sub di, 2
mov word [ecx], di
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x58]
xor ecx, esp
call fcn.10052756
add esp, 0x68
ret