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

Disassembly:
sub esp, 0x100
push ebx
push ebp
mov ebp, dword [esp + 0x10c]
mov ecx, dword [ebp + 0x40]
push esi
mov esi, eax
xor ebx, ebx
xor eax, eax
cmp ecx, ebx
mov dword [esp + 0x34], eax
je 0x500463
cmp dword [esp + 0x124], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
jne 0x4fff2e
mov dword [esp + 0x20], 0xbf800000
mov eax, dword [esp + 0x11c]
cmp eax, ebx
push edi
mov byte [esp + 0x13], 0
je 0x4fff7e
movsx ecx, word [eax]
movsx edx, word [eax + 4]
cmp ecx, edx
movsx edi, word [eax + 2]
movsx eax, word [eax + 6]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], eax
jle 0x4fff6a
mov dword [esp + 0x30], edx
mov dword [esp + 0x2c], ecx
cmp edi, eax
jle 0x4fff7e
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], eax
mov eax, dword [0xf91614]
mov edx, dword [eax + 8]
push ebx
push ebx
lea ecx, [edx + 0x20]
push ebx
push edx
mov edi, edx
mov dword [esp + 0x70], edx
mov dword [eax + 8], ecx
lea edx, [esp + 0x7c]
push edx
xor eax, eax
mov ecx, 8
push 1
mov edx, 0x54
rep stosd dword es:[edi], eax
call fcn.00515c30
mov eax, dword [esp + 0x78]
add esp, 0x18
push esi
lea ecx, [esp + 0x74]
push ecx
mov byte [eax + 0x15], 4
mov byte [esp + 0x6c], 1
call fcn.004931a0
push esi
lea edx, [esp + 0x9c]
push edx
call fcn.004931a0
push esi
lea eax, [esp + 0xc4]
push eax
call fcn.004931a0
push esi
lea ecx, [esp + 0xec]
push ecx
call fcn.004931a0
mov ecx, dword [ebp + 0x40]
mov edx, dword [esp + 0x118]
mov eax, dword [ecx + 0x14]
mov edi, dword [ebp + 0x2124]
mov dword [esp + 0x5c], edx
movzx edx, word [ecx + 0xa]
add eax, ecx
push 0x73
call fcn.004ff010
add esp, 4
cmp edi, 0x10
jne 0x500027
mov ax, word [eax + 0xe]
jmp 0x50002c
movsx ax, byte [eax + 8]
movsx edx, ax
mov eax, dword [esp + 0x124]
movzx ebx, byte [eax]
test ebx, ebx
mov ecx, 1
mov dword [esp + 0x58], edx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x4c], ecx
je 0x5003ee
jmp 0x500060
mov ebx, dword [esp + 0x50]
mov edx, dword [esp + 0x58]
lea esp, [esp]
mov eax, dword [esp + 0x12c]
test eax, eax
jl 0x500073
cmp ecx, eax
jg 0x5003ee
cmp ebx, 0xa
je 0x50042d
cmp ebx, 0x20
je 0x50008b
cmp ebx, 0x40
jne 0x500097
cmp ecx, 1
jle 0x500097
add dword [esp + 0x118], edx
jmp 0x5003ce
mov ebp, dword [ebp + 0x40]
movzx edx, word [ebp + 0xa]
mov eax, dword [ebp + 0x14]
add eax, ebp
push ebx
call fcn.004ff010
mov esi, eax
add esp, 4
test esi, esi
je 0x5003c3
mov ecx, dword [esp + 0x114]
mov al, byte [ecx + 0x211d]
test al, al
je 0x5000dc
movsx edx, byte [esp + 0x13]
mov eax, esi
mov ecx, ebp
call fcn.00500b50
add dword [esp + 0x118], eax
movsx ecx, byte [esi + 9]
mov edx, dword [esp + 0x118]
movzx edi, byte [esi + 2]
mov eax, dword [esp + 0x11c]
movzx ebp, byte [esi + 3]
movzx ebx, word [esi + 6]
add ecx, edx
movsx edx, byte [esi + 0xa]
add edx, eax
lea eax, [edi + ecx]
mov dword [esp + 0x28], eax
lea eax, [edx + ebp]
mov dword [esp + 0x18], eax
movzx eax, word [esi + 4]
lea edi, [eax + edi + 1]
mov dword [esp + 0x3c], edi
lea edi, [ebx + ebp + 1]
mov dword [esp + 0x34], edi
mov edi, dword [esp + 0x28]
cmp ecx, edi
mov dword [esp + 0x44], ecx
mov dword [esp + 0x54], edx
mov dword [esp + 0x40], eax
jle 0x50016c
mov ebp, ecx
mov ecx, edi
mov edi, ebp
mov ebp, edx
mov edx, dword [esp + 0x18]
mov dword [esp + 0x18], ebp
mov ebp, eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x3c], ebp
mov ebp, ebx
mov ebx, dword [esp + 0x34]
mov dword [esp + 0x44], ecx
mov dword [esp + 0x28], edi
mov dword [esp + 0x54], edx
mov dword [esp + 0x40], eax
mov dword [esp + 0x34], ebp
xor ebp, ebp
cmp dword [esp + 0x120], ebp
je 0x500281
cmp ecx, dword [esp + 0x30]
mov dword [esp + 0x14], ebp
jge 0x50018d
mov dword [esp + 0x14], 1
cmp ecx, dword [esp + 0x2c]
jl 0x500198
or dword [esp + 0x14], 2
cmp edx, dword [esp + 0x1c]
jge 0x5001a3
or dword [esp + 0x14], 4
cmp edx, dword [esp + 0x20]
jl 0x5001ae
or dword [esp + 0x14], 8
cmp edi, dword [esp + 0x30]
jge 0x5001b9
mov ebp, 1
cmp edi, dword [esp + 0x2c]
jl 0x5001c2
or ebp, 2
mov eax, dword [esp + 0x1c]
cmp dword [esp + 0x18], eax
jge 0x5001cf
or ebp, 4
mov eax, dword [esp + 0x20]
cmp dword [esp + 0x18], eax
jl 0x5001dc
or ebp, 8
mov edi, dword [esp + 0x14]
test edi, ebp
setne byte [esp + 0x13]
mov al, byte [esp + 0x13]
or ebp, edi
test al, al
mov dword [esp + 0x14], ebp
jne 0x500263
test byte [esp + 0x14], 1
mov eax, dword [esp + 0x40]
je 0x50020e
mov edi, dword [esp + 0x30]
mov ebp, edi
sub ebp, ecx
add eax, ebp
mov dword [esp + 0x44], edi
mov ecx, dword [esp + 0x14]
test cl, 2
je 0x500235
mov edi, dword [esp + 0x2c]
mov ebp, dword [esp + 0x28]
mov ecx, edi
sub ecx, ebp
mov ebp, dword [esp + 0x3c]
add ebp, ecx
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x28], edi
test cl, 4
je 0x500248
mov edi, dword [esp + 0x1c]
mov ebp, edi
sub ebp, edx
add ebx, ebp
mov dword [esp + 0x54], edi
test cl, 8
je 0x50026b
mov edx, dword [esp + 0x20]
mov ebp, dword [esp + 0x18]
mov edi, edx
sub edi, ebp
add dword [esp + 0x34], edi
mov dword [esp + 0x18], edx
jmp 0x50026b
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x38]
or edx, ecx
mov cl, byte [esp + 0x13]
test cl, cl
mov dword [esp + 0x38], edx
jne 0x50038f
mov ebp, dword [esp + 0x114]
fild dword [esp + 0x44]
movsx ecx, word [ebp + 0x44]
shl eax, 0xc
sub eax, 0x800
fst dword [esp + 0x70]
cdq
fild dword [esp + 0x54]
idiv ecx
fst dword [esp + 0x74]
fild dword [esp + 0x28]
fadd dword [0x5befcc]
fst dword [esp + 0x98]
fxch st(1)
fstp dword [esp + 0x9c]
fstp dword [esp + 0xc0]
fild dword [esp + 0x18]
fadd dword [0x5befcc]
fst dword [esp + 0xc4]
fxch st(1)
fstp dword [esp + 0xe8]
movsx ebp, word [ebp + 0x46]
fstp dword [esp + 0xec]
mov edi, eax
mov eax, ebx
shl eax, 0xc
sub eax, 0x800
cdq
idiv ebp
mov word [esp + 0x80], di
mov word [esp + 0xf8], di
mov ebx, eax
mov eax, dword [esp + 0x3c]
shl eax, 0xc
sub eax, 0x800
cdq
idiv ecx
mov word [esp + 0x82], bx
mov word [esp + 0xaa], bx
mov ecx, eax
mov eax, dword [esp + 0x34]
shl eax, 0xc
sub eax, 0x800
cdq
idiv ebp
mov edx, dword [esp + 0x24]
mov word [esp + 0xa8], cx
mov word [esp + 0xd0], cx
mov ecx, edx
mov dword [esp + 0x78], edx
mov dword [esp + 0xa0], edx
mov dword [esp + 0xc8], edx
lea edx, [esp + 0x60]
push edx
mov dword [esp + 0xf4], ecx
mov word [esp + 0xd6], ax
mov word [esp + 0xfe], ax
lea eax, [esp + 0x74]
call fcn.0050b810
inc dword [esp + 0x48]
mov eax, dword [esp + 0x114]
mov edi, dword [eax + 0x2124]
cmp edi, 0x10
jne 0x5003a7
mov si, word [esi + 0xe]
jmp 0x5003ac
movsx si, byte [esi + 8]
mov eax, dword [esp + 0x118]
mov ebx, dword [esp + 0x50]
movsx ecx, si
add eax, ecx
mov dword [esp + 0x118], eax
mov ebp, dword [esp + 0x114]
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x124]
movzx eax, byte [ecx + edx]
inc ecx
test eax, eax
mov byte [esp + 0x13], bl
mov dword [esp + 0x50], eax
mov dword [esp + 0x4c], ecx
jne 0x500054
call fcn.00515d10
mov eax, dword [esp + 0x48]
test eax, eax
pop edi
je 0x50045f
mov eax, dword [esp + 0x124]
test eax, eax
je 0x50044d
mov edx, dword [esp + 0x5c]
mov cx, word [ebp + 8]
push 0x1fc20
push eax
call fcn.0050d050
mov eax, dword [esp + 0x3c]
add esp, 8
pop esi
pop ebp
pop ebx
add esp, 0x100
ret 0x1c
mov eax, dword [esp + 0x11c]
mov edx, dword [ebp + 0x3c]
add eax, edx
mov dword [esp + 0x11c], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x118], eax
jmp 0x5003ce
mov ecx, dword [esp + 0x5c]
mov dx, word [ebp + 8]
mov eax, 0x1fc20
call fcn.0050cfd0
mov eax, dword [esp + 0x34]
pop esi
pop ebp
pop ebx
add esp, 0x100
ret 0x1c