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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5d96a2
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x19c
push ebx
push esi
push edi
mov eax, dword [ebp + 0x4c]
mov ebx, dword [ebp + 0x48]
xor edx, edx
mov dword [eax], edx
mov dword [eax + 4], edx
mov ecx, dword [ebx + 8]
xor eax, eax
cmp ecx, edx
mov dword [esp + 0x1b0], edx
jle 0x540374
mov ecx, dword [ebx + 4]
inc eax
mov ecx, dword [ecx + eax*4 - 4]
mov byte [ecx + 0x20], 1
mov ecx, dword [ebx + 8]
cmp eax, ecx
jl 0x540361
mov dword [esp + 0x34], 0x5e2824
mov dword [esp + 0x38], edx
mov dword [esp + 0x44], edx
mov dword [esp + 0x40], edx
mov dword [esp + 0x3c], edx
mov eax, dword [ebx + 8]
mov byte [esp + 0x1b0], 1
cmp eax, edx
jle 0x540431
mov dword [esp + 0x14], 1
mov dword [esp + 0x10], edx
mov eax, dword [ebx + 4]
mov esi, dword [eax + edx]
mov al, byte [esi + 0x20]
test al, al
je 0x540411
mov ecx, esi
call fcn.0050b080
mov edi, dword [esp + 0x14]
fstp qword [esi + 0x28]
mov eax, dword [ebx + 8]
mov ecx, edi
cmp ecx, eax
jge 0x5403fe
mov edx, dword [ebx + 4]
mov eax, dword [edx + edi*4]
mov ecx, dword [eax + 0x1c]
mov eax, dword [esi + 0x1c]
cmp ecx, eax
jne 0x5403f6
mov ecx, esi
call fcn.0050b080
fadd qword [esi + 0x28]
fstp qword [esi + 0x28]
mov edx, dword [ebx + 4]
mov eax, dword [edx + edi*4]
mov byte [eax + 0x20], 0
mov eax, dword [ebx + 8]
inc edi
cmp edi, eax
jl 0x5403cf
mov byte [esi + 0x20], 0
mov ecx, dword [esp + 0x3c]
push esi
push ecx
lea ecx, [esp + 0x3c]
call fcn.0040c9d0
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov eax, dword [ebx + 8]
add edx, 4
inc ecx
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], ecx
dec ecx
cmp ecx, eax
jl 0x5403ab
lea edx, [esp + 0x34]
push 0x50b720
push edx
call fcn.0050b780
mov ecx, 0x5e27fc
xor eax, eax
add esp, 8
mov dword [esp + 0x74], ecx
mov dword [esp + 0x78], eax
mov dword [esp + 0x84], eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x7c], eax
xor ebx, ebx
xor edi, edi
xor edx, edx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x30], eax
mov dword [esp + 0x2c], edi
mov dword [esp + 0x28], edx
mov dword [esp + 0x60], ecx
mov dword [esp + 0x64], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x4c], 0x5f0894
mov dword [esp + 0x50], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x54], eax
mov ecx, dword [esp + 0x3c]
mov byte [esp + 0x1b0], 5
test ecx, ecx
mov esi, ecx
jne 0x5404c9
mov dword [esp + 0x80], esi
mov dword [esp + 0x7c], esi
jmp 0x540503
lea eax, [ecx*4]
push eax
call sub.mfc42u.dll_operatornew
add esp, 4
mov dword [esp + 0x78], eax
push esi
push eax
call fcn.005463a0
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x28]
mov edi, dword [esp + 0x2c]
mov ebx, dword [esp + 0x24]
mov eax, dword [esp + 0x30]
mov dword [esp + 0x80], esi
mov dword [esp + 0x7c], esi
mov esi, ecx
test ecx, ecx
mov dword [esp + 0x10], esi
jne 0x54052f
cmp ebx, esi
je 0x540522
push ebx
call sub.mfc42u.dll_operatordelete
mov ecx, dword [esp + 0x40]
add esp, 4
mov dword [esp + 0x24], esi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x28], esi
jmp 0x540606
test ebx, ebx
jne 0x540557
shl ecx, 2
push ecx
call sub.mfc42u.dll_operatornew
add esp, 4
mov dword [esp + 0x24], eax
push esi
push eax
call fcn.005463a0
mov dword [esp + 0x2c], esi
mov dword [esp + 0x28], esi
jmp 0x540602
cmp ecx, edi
jg 0x540578
cmp ecx, edx
jle 0x54056f
sub ecx, edx
lea edx, [ebx + edx*4]
push ecx
push edx
call fcn.005463a0
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x28], esi
jmp 0x540606
test eax, eax
jne 0x54059f
mov eax, edx
cdq
and edx, 7
add eax, edx
sar eax, 3
cmp eax, 4
jge 0x540593
mov eax, 4
jmp 0x54059f
cmp eax, 0x400
jle 0x54059f
mov eax, 0x400
add eax, edi
cmp ecx, eax
mov dword [esp + 0x14], eax
jl 0x5405ad
mov dword [esp + 0x14], ecx
mov eax, dword [esp + 0x14]
lea ecx, [eax*4]
push ecx
call sub.mfc42u.dll_operatornew
mov ecx, dword [esp + 0x2c]
mov esi, dword [esp + 0x28]
mov ebx, eax
add esp, 4
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x28]
mov edx, esi
sub edx, eax
lea eax, [ebx + eax*4]
push edx
push eax
call fcn.005463a0
mov ecx, dword [esp + 0x24]
push ecx
call sub.mfc42u.dll_operatordelete
mov edx, dword [esp + 0x18]
add esp, 4
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], edx
mov ecx, dword [esp + 0x3c]
xor ebx, ebx
mov esi, ecx
cmp ecx, ebx
mov dword [esp + 0x10], esi
jne 0x540638
mov eax, dword [esp + 0x64]
cmp eax, ebx
je 0x54062b
push eax
call sub.mfc42u.dll_operatordelete
mov ecx, dword [esp + 0x40]
add esp, 4
mov dword [esp + 0x64], ebx
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x68], ebx
jmp 0x540725
mov edx, dword [esp + 0x64]
cmp edx, ebx
jne 0x540668
lea eax, [ecx*4]
push eax
call sub.mfc42u.dll_operatornew
add esp, 4
mov dword [esp + 0x64], eax
push esi
push eax
call fcn.005463a0
mov dword [esp + 0x6c], esi
mov dword [esp + 0x68], esi
jmp 0x540721
mov edi, dword [esp + 0x6c]
cmp ecx, edi
jg 0x540691
mov eax, dword [esp + 0x68]
cmp ecx, eax
jle 0x540688
sub ecx, eax
push ecx
lea ecx, [edx + eax*4]
push ecx
call fcn.005463a0
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x68], esi
jmp 0x540725
mov eax, dword [esp + 0x70]
cmp eax, ebx
jne 0x5406be
mov eax, dword [esp + 0x68]
cdq
and edx, 7
add eax, edx
sar eax, 3
cmp eax, 4
jge 0x5406b2
mov eax, 4
jmp 0x5406be
cmp eax, 0x400
jle 0x5406be
mov eax, 0x400
add eax, edi
cmp ecx, eax
mov dword [esp + 0x14], eax
jl 0x5406cc
mov dword [esp + 0x14], ecx
mov edx, dword [esp + 0x14]
lea eax, [edx*4]
push eax
call sub.mfc42u.dll_operatornew
mov ecx, dword [esp + 0x6c]
mov esi, dword [esp + 0x68]
mov ebx, eax
add esp, 4
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x68]
mov ecx, esi
sub ecx, eax
lea edx, [ebx + eax*4]
push ecx
push edx
call fcn.005463a0
mov eax, dword [esp + 0x64]
push eax
call sub.mfc42u.dll_operatordelete
mov ecx, dword [esp + 0x18]
add esp, 4
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], esi
mov dword [esp + 0x6c], ecx
mov ecx, dword [esp + 0x3c]
xor ebx, ebx
mov esi, ecx
cmp ecx, ebx
mov dword [esp + 0x10], esi
jne 0x540757
mov eax, dword [esp + 0x50]
cmp eax, ebx
je 0x54074a
push eax
call sub.mfc42u.dll_operatordelete
mov ecx, dword [esp + 0x40]
add esp, 4
mov dword [esp + 0x50], ebx
mov dword [esp + 0x58], ebx
mov dword [esp + 0x54], ebx
jmp 0x54085a
mov edx, dword [esp + 0x50]
cmp edx, ebx
jne 0x540786
lea edx, [ecx + ecx*4]
shl edx, 3
push edx
call sub.mfc42u.dll_operatornew
add esp, 4
mov dword [esp + 0x50], eax
push esi
push eax
call fcn.0040d460
mov dword [esp + 0x58], esi
mov dword [esp + 0x54], esi
jmp 0x540856
mov edi, dword [esp + 0x58]
cmp ecx, edi
jg 0x5407b2
mov eax, dword [esp + 0x54]
cmp ecx, eax
jle 0x5407a9
sub ecx, eax
lea eax, [eax + eax*4]
push ecx
lea ecx, [edx + eax*8]
push ecx
call fcn.0040d460
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x54], esi
jmp 0x54085a
mov eax, dword [esp + 0x5c]
cmp eax, ebx
jne 0x5407df
mov eax, dword [esp + 0x54]
cdq
and edx, 7
add eax, edx
sar eax, 3
cmp eax, 4
jge 0x5407d3
mov eax, 4
jmp 0x5407df
cmp eax, 0x400
jle 0x5407df
mov eax, 0x400
add eax, edi
cmp ecx, eax
mov dword [esp + 0x14], eax
jl 0x5407ed
mov dword [esp + 0x14], ecx
mov eax, dword [esp + 0x14]
lea edx, [eax + eax*4]
shl edx, 3
push edx
call sub.mfc42u.dll_operatornew
mov ebx, eax
mov eax, dword [esp + 0x58]
mov esi, dword [esp + 0x54]
mov edi, ebx
lea ecx, [eax + eax*4]
add esp, 4
shl ecx, 3
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x54]
mov esi, dword [esp + 0x10]
mov ecx, esi
lea edx, [eax + eax*4]
sub ecx, eax
push ecx
lea eax, [ebx + edx*8]
push eax
call fcn.0040d460
mov ecx, dword [esp + 0x50]
push ecx
call sub.mfc42u.dll_operatordelete
mov edx, dword [esp + 0x18]
add esp, 4
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], esi
mov dword [esp + 0x58], edx
mov ecx, dword [esp + 0x3c]
xor eax, eax
test ecx, ecx
jle 0x5408ab
xor edx, edx
mov ecx, dword [esp + 0x38]
mov esi, dword [esp + 0x78]
mov ecx, dword [ecx + eax*4]
mov ecx, dword [ecx + 0x1c]
mov dword [esi + eax*4], ecx
mov ecx, dword [esp + 0x24]
mov dword [ecx + eax*4], 0
mov ecx, dword [esp + 0x38]
mov esi, dword [esp + 0x64]
mov ecx, dword [ecx + eax*4]
mov ecx, dword [ecx + 0x14]
mov dword [esi + eax*4], ecx
mov esi, dword [esp + 0x38]
mov ecx, dword [esp + 0x50]
mov esi, dword [esi + eax*4]
add ecx, edx
inc eax
add edx, 0x28
mov dword [esi + 0x10], ecx
mov ecx, dword [esp + 0x3c]
cmp eax, ecx
jl 0x540862
mov edi, dword [ebp + 0x48]
xor eax, eax
mov dword [esp + 0x10], eax
mov edx, dword [edi + 8]
test edx, edx
jle 0x5408fe
mov edx, dword [edi + 4]
mov esi, dword [edx + eax*4]
xor eax, eax
test ecx, ecx
jle 0x5408ee
mov ebx, dword [esi + 0x1c]
mov edx, dword [esp + 0x78]
cmp dword [edx], ebx
je 0x5408dc
inc eax
add edx, 4
cmp eax, ecx
jl 0x5408ce
jmp 0x5408ee
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + eax*4]
inc edx
mov dword [ecx + eax*4], edx
mov dword [esi + 0x1c], eax
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x10]
mov edx, dword [edi + 8]
inc eax
cmp eax, edx
mov dword [esp + 0x10], eax
jl 0x5408bb
xor esi, esi
mov dword [esp + 0x88], 0x5e27fc
mov dword [esp + 0x8c], esi
mov dword [esp + 0x98], esi
mov dword [esp + 0x94], esi
mov dword [esp + 0x90], esi
push 0xffffffffffffffff
push ecx
lea ecx, [esp + 0x90]
mov byte [esp + 0x1b8], 6
call fcn.0046d900
mov ecx, dword [edi + 8]
xor eax, eax
cmp ecx, esi
jle 0x540969
mov ecx, dword [edi + 4]
mov ecx, dword [ecx + eax*4]
cmp dword [ecx + 0x18], esi
jne 0x540961
mov edx, dword [ecx + 0x1c]
mov ecx, dword [esp + 0x8c]
lea ecx, [ecx + edx*4]
inc dword [ecx]
mov ecx, dword [edi + 8]
inc eax
cmp eax, ecx
jl 0x540947
lea ecx, [esp + 0xd8]
call fcn.00527e70
xor esi, esi
mov dword [esp + 0x9c], 0x5e2824
mov dword [esp + 0xa0], esi
mov dword [esp + 0xac], esi
mov dword [esp + 0xa8], esi
mov dword [esp + 0xa4], esi
mov ebx, dword [ebp + 0x10]
lea edx, [esp + 0x74]
lea eax, [esp + 0x20]
push edx
lea ecx, [esp + 0xa0]
push eax
mov eax, dword [ebp + 0x44]
lea edx, [esp + 0x3c]
push ecx
mov ecx, dword [ebp + 0x40]
push edx
mov edx, dword [ebp + 0xc]
push eax
push ecx
push ebx
push edx
lea ecx, [ebp + 0x1c]
mov byte [esp + 0x1d0], 8
call fcn.004b7060
sub esp, 8
lea ecx, [esp + 0x100]
fstp qword [esp]
push 1
push esi
push esi
push 1
call fcn.0052d1b0
lea eax, [esp + 0x74]
lea ecx, [esp + 0x20]
push eax
lea edx, [esp + 0x38]
push ecx
lea eax, [ebp + 0x1c]
push edx
push eax
lea ecx, [esp + 0xe8]
call fcn.0052e170
mov ecx, dword [esp + 0x28]
xor eax, eax
cmp ecx, esi
jle 0x540a30
mov edx, dword [esp + 0x8c]
mov ecx, dword [esp + 0x24]
mov edx, dword [edx + eax*4]
sub dword [ecx + eax*4], edx
mov ecx, dword [esp + 0x28]
inc eax
cmp eax, ecx
jl 0x540a16
lea ecx, [esp + 0x48]
call sub.mfc42u.dll_CString::CString_3
push esi
lea eax, [esp + 0x4c]
push esi
push eax
mov byte [esp + 0x1bc], 9
call fcn.00436a50
add esp, 0xc
test al, al
jne 0x540b71
lea ecx, [esp + 0x48]
mov byte [esp + 0x1b0], 8
call sub.mfc42u.dll_CString::CString
mov dword [esp + 0x9c], 0x5e2824
mov eax, dword [esp + 0xa0]
mov byte [esp + 0x1b0], 0xa
cmp eax, esi
je 0x540a90
push eax
call sub.mfc42u.dll_operatordelete
add esp, 4
mov esi, 0x5e262c
lea ecx, [esp + 0xd8]
mov dword [esp + 0x9c], esi
mov byte [esp + 0x1b0], 6
call fcn.00527f70
mov dword [esp + 0x88], 0x5e27fc
mov eax, dword [esp + 0x8c]
mov byte [esp + 0x1b0], 0xb
test eax, eax
je 0x540ad7
push eax
call sub.mfc42u.dll_operatordelete
add esp, 4
mov dword [esp + 0x88], esi
mov dword [esp + 0x4c], 0x5f0894
mov eax, dword [esp + 0x50]
mov byte [esp + 0x1b0], 0xc
test eax, eax
je 0x540aff
push eax
call sub.mfc42u.dll_operatordelete
add esp, 4
lea ecx, [esp + 0x60]
mov dword [esp + 0x4c], esi
mov byte [esp + 0x1b0], 3
call fcn.0040a7f0
lea ecx, [esp + 0x20]
mov byte [esp + 0x1b0], 2
call fcn.0040a7f0
lea ecx, [esp + 0x74]
mov byte [esp + 0x1b0], 1
call fcn.0040a7f0
lea ecx, [esp + 0x34]
mov byte [esp + 0x1b0], 0
call fcn.0040bf90
lea ecx, [ebp + 0x1c]
mov dword [esp + 0x1b0], 0xffffffff
call fcn.0042bd50
xor eax, eax
mov ecx, dword [esp + 0x1a8]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 8]
xor esi, esi
test eax, eax
jle 0x540b8f
mov ecx, dword [edi + 4]
push 0
mov ecx, dword [ecx + esi*4]
mov edx, dword [ecx]
call dword [edx + 0x1c]
mov eax, dword [edi + 8]
inc esi
cmp esi, eax
jl 0x540b7a
lea ecx, [esp + 0xc4]
call fcn.005442d0
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 0x3c]
push ecx
push ebx
push edx
push eax
lea ecx, [esp + 0xec]
mov byte [esp + 0x1c4], 0xd
call fcn.005280d0
lea ecx, [esp + 0xb0]
mov dword [0x620748], 0xc28f5c29
mov dword [0x62074c], 0x3ff028f5
call fcn.00460670
lea ecx, [esp + 0x20]
mov byte [esp + 0x1b0], 0xe
push ecx
lea ecx, [esp + 0xb4]
call fcn.00545170
mov edx, dword [ebp + 0x4c]
xor ebx, ebx
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x3c]
xor ecx, ecx
xor eax, eax
test edx, edx
jle 0x540cd4
mov edx, dword [esp + 0x64]
cmp dword [edx + eax*4], ebx
jne 0x540c35
mov edx, dword [esp + 0x24]
mov esi, dword [esp + 0xb4]
mov edx, dword [edx + eax*4]
mov dword [esi + eax*4], edx
mov edx, dword [esp + 0x24]
add ecx, dword [edx + eax*4]
jmp 0x540c43
mov edx, dword [esp + 0xb4]
mov dword [edx + eax*4], 0
mov edx, dword [esp + 0x3c]
inc eax
cmp eax, edx
jl 0x540c12
test ecx, ecx
je 0x540cd4
lea eax, [esp + 0xc4]
lea ecx, [esp + 0x88]
push eax
push edi
lea edx, [esp + 0xb8]
push ecx
lea eax, [esp + 0x40]
push edx
push eax
lea edx, [ebp + 0x1c]
sub esp, 0x20
mov ecx, esp
mov dword [esp + 0x48], esp
push edx
call fcn.004b6cb0
mov eax, dword [ebp + 8]
lea ecx, [esp + 0x10c]
lea eax, [eax + eax*2]
lea eax, [eax + eax*4]
shl eax, 2
push eax
push 1
call fcn.0053e1b0
fstp qword [esp + 0x14]
push 0
lea ecx, [esp + 0x4c]
push 0
push ecx
call fcn.00436a50
add esp, 0xc
test al, al
je 0x540cd4
fld qword [esp + 0x14]
mov eax, dword [esp + 0x10]
inc ebx
fld st(0)
fstp qword [eax]
add eax, 8
fstp qword [ebp + 0x1c]
mov dword [esp + 0x10], eax
jmp 0x540c02
mov eax, dword [edi + 8]
xor esi, esi
test eax, eax
jle 0x540cf2
mov edx, dword [edi + 4]
push 1
mov ecx, dword [edx + esi*4]
mov eax, dword [ecx]
call dword [eax + 0x1c]
mov eax, dword [edi + 8]
inc esi
cmp esi, eax
jl 0x540cdd
push 0
lea ecx, [esp + 0x4c]
push 1
push ecx
call fcn.00436a50
add esp, 0xc
lea ecx, [esp + 0xb0]
mov byte [esp + 0x1b0], 0xd
call fcn.0040a7f0
lea ecx, [esp + 0xc4]
mov byte [esp + 0x1b0], 9
call fcn.00544920
lea ecx, [esp + 0x48]
mov byte [esp + 0x1b0], 8
call sub.mfc42u.dll_CString::CString
lea ecx, [esp + 0x9c]
mov byte [esp + 0x1b0], 7
call fcn.0040bf90
lea ecx, [esp + 0xd8]
mov byte [esp + 0x1b0], 6
call fcn.00527f70
lea ecx, [esp + 0x88]
mov byte [esp + 0x1b0], 5
call fcn.0040a7f0
lea ecx, [esp + 0x4c]
mov byte [esp + 0x1b0], 4
call fcn.005457a0
lea ecx, [esp + 0x60]
mov byte [esp + 0x1b0], 3
call fcn.0040a7f0
lea ecx, [esp + 0x20]
mov byte [esp + 0x1b0], 2
call fcn.0040a7f0
lea ecx, [esp + 0x74]
mov byte [esp + 0x1b0], 1
call fcn.0040a7f0
lea ecx, [esp + 0x34]
mov byte [esp + 0x1b0], 0
call fcn.0040bf90
lea ecx, [ebp + 0x1c]
mov dword [esp + 0x1b0], 0xffffffff
call fcn.0042bd50
mov ecx, dword [esp + 0x1a8]
pop edi
mov eax, ebx
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret