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

Disassembly:
push 0xffffffffffffffff
push 0x56d624
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5bf500]
xor eax, esp
push eax
lea eax, [esp + 0x70]
mov dword fs:[0], eax
mov si, word [esp + 0x90]
xor ebx, ebx
mov dword [esp + 0x14], ebx
test si, si
je 0x519905
mov eax, dword [esp + 0x80]
mov edi, dword [esp + 0x88]
mov ecx, edi
mov eax, dword [eax + 0xc]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x84]
movzx ebp, ax
push ebp
call fcn.00503cf0
mov edx, ebp
mov ecx, edi
sub edx, eax
movzx eax, si
imul eax, edx
xor edx, edx
div ebp
mov esi, edx
call fcn.0050f040
cmp eax, 1
ja 0x5197b6
push ebp
lea ecx, [esp + 0x38]
call fcn.004fdf50
push esi
lea ecx, [esp + 0x24]
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x18], 1
call fcn.004fdf50
lea eax, [esp + 0x20]
mov dword [esp + 0x78], 1
push eax
push dword [esp + 0x90]
lea eax, [esp + 0x64]
mov dword [esp + 0x1c], 3
push eax
call fcn.004f4a00
push eax
lea eax, [esp + 0x58]
mov dword [esp + 0x88], 2
push edi
push eax
mov dword [esp + 0x2c], 7
call fcn.004f4a40
add esp, 0x18
lea ecx, [esp + 0x34]
mov dword [esp + 0x78], 3
push ecx
mov ebx, 0xf
mov ecx, eax
mov dword [esp + 0x18], ebx
call fcn.005014b0
mov byte [esp + 0x90], 1
test eax, eax
je 0x5197be
mov byte [esp + 0x90], 0
mov dword [esp + 0x78], 2
test bl, 8
je 0x519805
mov eax, dword [esp + 0x54]
and ebx, 0xfffffff7
mov edx, dword [esp + 0x50]
mov edi, eax
mov dword [esp + 0x18], eax
mov ecx, edx
push dword [esp + 0x18]
xor eax, eax
mov dword [esp + 0x18], ebx
rep stosd dword es:[edi], eax
lea eax, [edx*4]
cmp eax, 0x10
jb 0x5197fd
call fcn.004edb70
jmp 0x519802
call fcn.00443e80
add esp, 4
mov dword [esp + 0x78], 1
test bl, 4
je 0x51984c
mov eax, dword [esp + 0x68]
and ebx, 0xfffffffb
mov edx, dword [esp + 0x64]
mov edi, eax
mov dword [esp + 0x18], eax
mov ecx, edx
push dword [esp + 0x18]
xor eax, eax
mov dword [esp + 0x18], ebx
rep stosd dword es:[edi], eax
lea eax, [edx*4]
cmp eax, 0x10
jb 0x519844
call fcn.004edb70
jmp 0x519849
call fcn.00443e80
add esp, 4
mov dword [esp + 0x78], 0
test bl, 2
je 0x519893
mov eax, dword [esp + 0x2c]
and ebx, 0xfffffffd
mov edx, dword [esp + 0x28]
mov edi, eax
mov dword [esp + 0x18], eax
mov ecx, edx
push dword [esp + 0x18]
xor eax, eax
mov dword [esp + 0x18], ebx
rep stosd dword es:[edi], eax
lea eax, [edx*4]
cmp eax, 0x10
jb 0x51988b
call fcn.004edb70
jmp 0x519890
call fcn.00443e80
add esp, 4
mov dword [esp + 0x78], 0xffffffff
test bl, 1
je 0x5198cc
mov edx, dword [esp + 0x3c]
xor eax, eax
mov ebx, dword [esp + 0x40]
mov ecx, edx
mov edi, ebx
rep stosd dword es:[edi], eax
lea eax, [edx*4]
push ebx
cmp eax, 0x10
jb 0x5198c4
call fcn.004edb70
jmp 0x5198c9
call fcn.00443e80
add esp, 4
cmp byte [esp + 0x90], 0
je 0x5198d8
add esi, ebp
mov ebx, dword [esp + 0x1c]
cmp esi, ebx
jae 0x519905
mov eax, dword [esp + 0x80]
mov ecx, dword [eax]
mov eax, esi
shr eax, 5
lea edx, [ecx + eax*4]
mov ecx, esi
and ecx, 0x1f
mov eax, 1
shl eax, cl
add esi, ebp
or dword [edx], eax
cmp esi, ebx
jb 0x5198e0
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x68
ret