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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x504bd2
sub esp, 0x48
mov edi, dword [esp + 0x4c]
mov esi, dword [esp + 0x54]
xor ebx, ebx
mov dword [esp + 0x78], ebx
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x80], ebx
cmp byte [esp + 0x58], 0
je 0x5048c5
mov ecx, edi
mov eax, dword [esp + 0x50]
mov ebx, eax
inc ebx
cmp ebx, esi
ja 0x504b9c
mov dword [esp + 0x50], ebx
mov ebx, ecx
add ebx, eax
mov byte [ebx], 0x2d
mov ebx, dword [esp + 0x6c]
cmp ebx, 0
jle 0x504b4a
mov ecx, dword [esp + 0x68]
mov eax, dword [esp + 0x6c]
cmp ecx, eax
jge 0x5048e0
mov eax, ecx
mov dword [esp + 0x24], eax
mov ecx, dword [esp + 0x64]
cmp eax, ecx
ja 0x504b43
mov edx, dword [esp + 0x5c]
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], ecx
mov dword [esp + 0x3c], edx
mov dword [esp + 0x4c], edi
mov edx, dword [esp + 0x50]
mov dword [esp + 0x54], esi
mov eax, esi
mov ebx, dword [esp + 0x40]
mov ecx, edx
add ecx, ebx
cmp ecx, esi
jbe 0x504956
mov dword [esp], 0x5c41e0
mov dword [esp + 0x30], edi
mov dword [esp + 4], edi
mov dword [esp + 0x34], edx
mov dword [esp + 8], edx
mov dword [esp + 0x38], eax
mov dword [esp + 0xc], eax
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x10], ecx
call fcn.0043c390
mov ecx, dword [esp + 0x2c]
mov edi, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x38], eax
cmp ecx, eax
ja 0x504b3c
mov dword [esp + 0x34], ecx
mov eax, dword [esp + 0x40]
mov ebx, dword [esp + 0x50]
mov ebp, edi
mov dword [esp + 0x30], edi
add ebp, ebx
mov dword [esp], ebp
mov ebx, dword [esp + 0x3c]
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
call fcn.004536c0
mov edi, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
mov esi, dword [esp + 0x38]
mov eax, dword [esp + 0x6c]
mov ebx, dword [esp + 0x24]
cmp eax, ebx
jle 0x5049db
mov dword [esp + 0x4c], edi
mov edx, edi
mov dword [esp + 0x50], ecx
mov ebx, ecx
mov dword [esp + 0x54], esi
mov eax, ecx
inc ebx
cmp ebx, esi
ja 0x504b0a
mov ecx, ebx
mov ebx, edx
add ebx, eax
mov byte [ebx], 0x30
mov ebx, dword [esp + 0x24]
inc ebx
mov dword [esp + 0x24], ebx
mov eax, dword [esp + 0x6c]
mov ebx, dword [esp + 0x24]
cmp eax, ebx
jg 0x5049a2
mov ebx, dword [esp + 0x74]
cmp ebx, 0
jle 0x504a8f
mov dword [esp + 0x4c], edi
mov edx, edi
mov dword [esp + 0x50], ecx
mov ebx, ecx
mov dword [esp + 0x54], esi
mov eax, ecx
inc ebx
cmp ebx, esi
ja 0x504ad8
mov ecx, ebx
mov ebx, edx
add ebx, eax
mov byte [ebx], 0x2e
mov dword [esp + 0x28], 0
mov ebx, dword [esp + 0x28]
mov ebp, dword [esp + 0x74]
cmp ebx, ebp
jge 0x504a8f
mov byte [esp + 0x23], 0x30
mov eax, dword [esp + 0x6c]
add eax, dword [esp + 0x28]
cmp eax, 0
jl 0x504a54
mov edx, dword [esp + 0x68]
cmp edx, eax
jle 0x504a54
mov ebp, dword [esp + 0x60]
cmp eax, ebp
jae 0x504ad1
mov ebp, dword [esp + 0x5c]
add ebp, eax
movzx ebx, byte [ebp]
mov byte [esp + 0x23], bl
mov dword [esp + 0x4c], edi
mov edx, edi
mov dword [esp + 0x50], ecx
mov ebx, ecx
mov dword [esp + 0x54], esi
mov eax, ecx
inc ebx
cmp ebx, esi
ja 0x504aa2
mov ecx, ebx
mov ebx, edx
add ebx, eax
movzx ebp, byte [esp + 0x23]
xchg ebp, eax
mov byte [ebx], al
xchg ebp, eax
mov ebx, dword [esp + 0x28]
inc ebx
mov dword [esp + 0x28], ebx
mov ebx, dword [esp + 0x28]
mov ebp, dword [esp + 0x74]
cmp ebx, ebp
jl 0x504a20
mov dword [esp + 0x78], edi
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x80], esi
add esp, 0x48
ret
mov dword [esp], 0x5c41e0
mov dword [esp + 4], edx
mov dword [esp + 8], eax
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], ebx
call fcn.0043c390
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
mov ecx, eax
inc ecx
mov edi, edx
jmp 0x504a6d
call fcn.004287a0
ud2
mov dword [esp], 0x5c41e0
mov dword [esp + 4], edx
mov dword [esp + 8], eax
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], ebx
call fcn.0043c390
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
mov ecx, eax
inc ecx
mov edi, edx
jmp 0x504a05
mov dword [esp], 0x5c41e0
mov dword [esp + 4], edx
mov dword [esp + 8], eax
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], ebx
call fcn.0043c390
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
mov ecx, eax
inc ecx
mov edi, edx
jmp 0x5049bf
call fcn.00428810
ud2
call fcn.00428810
ud2
mov dword [esp + 0x4c], edi
mov edx, edi
mov eax, dword [esp + 0x50]
mov dword [esp + 0x54], esi
mov ebx, eax
inc ebx
cmp ebx, esi
ja 0x504b6d
mov ecx, ebx
mov ebx, edx
add ebx, eax
mov byte [ebx], 0x30
jmp 0x5049db
mov dword [esp], 0x5c41e0
mov dword [esp + 4], edx
mov dword [esp + 8], eax
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], ebx
call fcn.0043c390
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
mov ecx, eax
inc ecx
mov edi, edx
jmp 0x504b61
mov dword [esp], 0x5c41e0
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], ebx
call fcn.0043c390
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
mov ebx, eax
inc ebx
mov dword [esp + 0x50], ebx
mov edi, ecx
jmp 0x5048be
call fcn.00450ed0
jmp fcn.00504870