Function at 0x508380
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5d66b0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x6c
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, ecx
mov dword [esp + 0xc], edi
mov esi, dword [edi + 4]
and esi, ebx
mov ebx, dword [ebp + 0xc]
mov ecx, ebx
call fcn.004ccd50
mov ecx, dword [eax]
mov dword [esp + 0x30], ecx
mov edx, dword [eax + 4]
mov dword [esp + 0x34], edx
mov ecx, dword [eax + 8]
mov dword [esp + 0x38], ecx
lea ecx, [esp + 0x30]
mov edx, dword [eax + 0xc]
mov eax, dword [edi]
push ecx
mov ecx, edi
mov dword [esp + 0x40], edx
call dword [eax + 0xc]
cmp esi, 1
jne 0x508511
xor esi, esi
mov dword [esp + 0x64], 0x5e2984
mov dword [esp + 0x68], esi
mov dword [esp + 0x74], esi
mov dword [esp + 0x70], esi
mov dword [esp + 0x6c], esi
mov eax, dword [ebp + 0x18]
mov dword [esp + 0x80], esi
cmp eax, esi
je 0x508421
lea edx, [esp + 0x64]
push edx
push eax
push 1
call fcn.005081a0
add esp, 0xc
mov ecx, ebx
call fcn.004b7040
fdiv qword [edi + 0x10]
call sub.msvcrt.dll__ftol
inc eax
cmp eax, esi
jle 0x5084ed
mov edi, dword [ebp + 0x14]
mov dword [esp + 0x10], eax
jmp 0x508444
xor esi, esi
fld qword [esp + 0x30]
fcomp qword [ebx]
fnstsw ax
test ah, 1
jne 0x50846d
fld qword [esp + 0x30]
fcomp qword [ebx + 0x10]
fnstsw ax
test ah, 0x41
je 0x50846d
mov ecx, dword [ebp + 0x10]
lea eax, [esp + 0x30]
push eax
push ecx
call edi
add esp, 8
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x24], ecx
test eax, eax
mov dword [esp + 0x28], edx
jle 0x5084d2
mov eax, dword [esp + 0x68]
fld qword [esp + 0x30]
fadd qword [eax + esi*8]
fst qword [esp + 0x1c]
fcomp qword [ebx]
fnstsw ax
test ah, 1
jne 0x5084c9
fld qword [esp + 0x1c]
fcomp qword [ebx + 0x10]
fnstsw ax
test ah, 0x41
je 0x5084c9
mov edx, dword [ebp + 0x10]
lea ecx, [esp + 0x1c]
push ecx
push edx
call edi
add esp, 8
mov eax, dword [esp + 0x6c]
inc esi
cmp esi, eax
jl 0x508495
mov eax, dword [esp + 0xc]
fld qword [esp + 0x30]
fadd qword [eax + 0x10]
dec dword [esp + 0x10]
fstp qword [esp + 0x30]
jne 0x508442
xor esi, esi
mov dword [esp + 0x64], 0x5e2984
mov eax, dword [esp + 0x68]
mov dword [esp + 0x80], 1
cmp eax, esi
je 0x508874
jmp 0x50886b
cmp esi, 2
jne 0x50864f
xor esi, esi
mov dword [esp + 0x64], 0x5e2984
mov dword [esp + 0x68], esi
mov dword [esp + 0x74], esi
mov dword [esp + 0x70], esi
mov dword [esp + 0x6c], esi
mov eax, dword [ebp + 0x18]
mov dword [esp + 0x80], 2
cmp eax, esi
je 0x508556
lea ecx, [esp + 0x64]
push ecx
push eax
push 2
call fcn.005081a0
add esp, 0xc
mov ecx, ebx
call fcn.004b7060
fdiv qword [edi + 0x20]
call sub.msvcrt.dll__ftol
inc eax
cmp eax, esi
jle 0x50862b
mov edi, dword [ebp + 0x14]
mov ebx, dword [ebp + 0x10]
mov dword [esp + 0x10], eax
mov ecx, dword [ebp + 0xc]
fld qword [esp + 0x38]
fcomp qword [ecx + 8]
fnstsw ax
test ah, 1
jne 0x5085a5
fld qword [esp + 0x38]
fcomp qword [ecx + 0x18]
fnstsw ax
test ah, 0x41
je 0x5085a5
lea edx, [esp + 0x30]
push edx
push ebx
call edi
mov ecx, dword [ebp + 0xc]
add esp, 8
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x34]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x3c]
xor esi, esi
mov dword [esp + 0x28], edx
test eax, eax
jle 0x50860d
mov eax, dword [esp + 0x68]
fld qword [esp + 0x38]
fadd qword [eax + esi*8]
fst qword [esp + 0x24]
fcomp qword [ecx + 8]
fnstsw ax
test ah, 1
jne 0x508604
fld qword [esp + 0x24]
fcomp qword [ecx + 0x18]
fnstsw ax
test ah, 0x41
je 0x508604
lea ecx, [esp + 0x1c]
push ecx
push ebx
call edi
mov ecx, dword [ebp + 0xc]
add esp, 8
mov eax, dword [esp + 0x6c]
inc esi
cmp esi, eax
jl 0x5085cf
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 0x10]
fld qword [esp + 0x38]
fadd qword [edx + 0x20]
dec eax
mov dword [esp + 0x10], eax
fstp qword [esp + 0x38]
jne 0x508578
mov dword [esp + 0x64], 0x5e2984
mov eax, dword [esp + 0x68]
mov dword [esp + 0x80], 3
test eax, eax
je 0x508874
jmp 0x50886b
cmp esi, 3
jne 0x508874
mov eax, 0x5e2984
xor edi, edi
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], edi
mov dword [esp + 0x74], edi
mov dword [esp + 0x70], edi
mov dword [esp + 0x6c], edi
mov dword [esp + 0x80], 4
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], edi
mov dword [esp + 0x60], edi
mov dword [esp + 0x5c], edi
mov dword [esp + 0x58], edi
push 0xffffffffffffffff
push 1
lea ecx, [esp + 0x6c]
mov byte [esp + 0x88], 5
call fcn.004e5b10
mov eax, dword [esp + 0x68]
push 0xffffffffffffffff
mov dword [eax], edi
mov ecx, dword [esp + 0x6c]
mov dword [ecx + 4], edi
mov esi, dword [esp + 0x5c]
lea ecx, [esp + 0x54]
lea edx, [esi + 1]
push edx
call fcn.004e5b10
mov eax, dword [esp + 0x54]
mov dword [eax + esi*8], edi
mov ecx, dword [esp + 0x54]
mov dword [ecx + esi*8 + 4], edi
mov esi, dword [ebp + 0x18]
cmp esi, edi
je 0x5086fa
lea edx, [esp + 0x50]
push edx
push esi
push 2
call fcn.005081a0
lea eax, [esp + 0x70]
push eax
push esi
push 1
call fcn.005081a0
add esp, 0x18
mov ecx, ebx
call fcn.004b7040
mov ecx, dword [esp + 0xc]
fdiv qword [ecx + 0x10]
call sub.msvcrt.dll__ftol
mov esi, eax
mov ecx, ebx
inc esi
call fcn.004b7060
mov edx, dword [esp + 0xc]
fdiv qword [edx + 0x20]
call sub.msvcrt.dll__ftol
mov ecx, dword [esp + 0x3c]
mov edx, eax
mov eax, dword [esp + 0x38]
inc edx
cmp esi, edi
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ecx
jle 0x50882a
mov ecx, dword [esp + 0x58]
mov dword [esp + 0x14], esi
mov eax, dword [esp + 0x1c]
mov esi, dword [esp + 0x20]
cmp edx, edi
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], esi
jle 0x508811
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x10], edx
jmp 0x50876e
xor edi, edi
test eax, eax
jle 0x5087f6
xor esi, esi
test ecx, ecx
jle 0x5087ed
mov edx, dword [esp + 0x68]
mov eax, dword [esp + 0x54]
fld qword [esp + 0x30]
fadd qword [edx + edi*8]
fstp qword [esp + 0x40]
fld qword [esp + 0x38]
fadd qword [eax + esi*8]
fstp qword [esp + 0x48]
fld qword [esp + 0x40]
fcomp qword [ebx + 0x10]
fnstsw ax
test ah, 0x41
je 0x5087e4
fld qword [esp + 0x40]
fcomp qword [ebx]
fnstsw ax
test ah, 1
jne 0x5087e4
fld qword [esp + 0x48]
fcomp qword [ebx + 0x18]
fnstsw ax
test ah, 0x41
je 0x5087e4
fld qword [esp + 0x48]
fcomp qword [ebx + 8]
fnstsw ax
test ah, 1
jne 0x5087e4
mov edx, dword [ebp + 0x10]
lea ecx, [esp + 0x40]
push ecx
push edx
call dword [ebp + 0x14]
mov ecx, dword [esp + 0x60]
add esp, 8
inc esi
cmp esi, ecx
jl 0x50877c
mov eax, dword [esp + 0x6c]
inc edi
cmp edi, eax
jl 0x508776
mov edx, dword [esp + 0x18]
mov esi, dword [esp + 0xc]
fld qword [esp + 0x38]
fadd qword [esi + 0x20]
dec dword [esp + 0x10]
fstp qword [esp + 0x38]
jne 0x50876c
xor edi, edi
mov eax, dword [esp + 0xc]
fld qword [esp + 0x30]
fadd qword [eax + 0x10]
dec dword [esp + 0x14]
fstp qword [esp + 0x30]
jne 0x50874a
mov esi, 0x5e2984
mov dword [esp + 0x50], esi
mov eax, dword [esp + 0x54]
mov byte [esp + 0x80], 6
cmp eax, edi
je 0x50884c
push eax
call sub.mfc42u.dll_operatordelete
add esp, 4
mov dword [esp + 0x50], 0x5e262c
mov dword [esp + 0x64], esi
mov eax, dword [esp + 0x68]
mov dword [esp + 0x80], 7
cmp eax, edi
je 0x508874
push eax
call sub.mfc42u.dll_operatordelete
add esp, 4
mov ecx, dword [esp + 0x78]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x14