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

Disassembly:
push 0xffffffffffffffff
push 0x5bc248
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebx
mov ebx, ecx
push ebp
push esi
mov eax, dword [ebx + 0x1a84]
push edi
test eax, eax
je 0x52021e
mov edx, dword [esp + 0x28]
lea ebp, [eax + 0x5c]
mov eax, dword [eax + 0x58]
lea ecx, [eax + edx]
cmp ecx, 0x4000
jge 0x51fe43
mov esi, dword [esp + 0x24]
mov ecx, edx
lea edi, [eax + ebp]
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 [ebx + 0x1a84]
mov ecx, dword [eax + 0x58]
add ecx, edx
mov dword [eax + 0x58], ecx
mov ecx, dword [ebx + 0x1a84]
mov edx, dword [ecx + 0x58]
mov byte [edx + ebp], 0
jmp 0x51fe73
mov esi, dword [esp + 0x24]
mov ecx, 0x3fff
sub ecx, eax
lea edi, [eax + ebp]
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 ecx, dword [ebx + 0x1a84]
mov dword [ecx + 0x58], 0x3fff
mov byte [ebp + 0x3fff], 0
push str.LOCK01_SUCCESS
push ebp
call dword [sym.imp.MSVCRT.dll_strstr]
add esp, 8
test eax, eax
jne 0x51fecd
mov eax, dword [ebx + 0x1a84]
cmp dword [eax + 0x58], 0x12
jle 0x51feb1
cmp byte [ebp], 1
jne 0x51feb1
mov cl, byte [ebp + 1]
test cl, cl
jne 0x51feb1
xor edx, edx
xor ecx, ecx
mov dl, byte [ebp + 2]
mov cl, byte [ebp + 3]
shl edx, 8
add edx, ecx
mov dword [eax + 0x54], edx
mov eax, dword [ebx + 0x1a84]
mov ecx, dword [eax + 0x54]
mov edx, dword [eax + 0x58]
cmp ecx, edx
jle 0x51fecd
cmp ecx, 0x3fff
jne 0x52021e
cmp byte [ebx + 0x1adc], 1
jne 0x51fef3
mov eax, dword [ebx + 0x1a84]
mov edx, dword [eax + 0x58]
sub edx, 0x13
cmp edx, 4
jge 0x51fef3
mov dword [eax + 0x58], 0
jmp 0x52021e
mov cl, byte [ebp + 0x10]
mov al, 0xf
cmp cl, al
mov edx, 0x13
jne 0x51ff08
mov edx, 0x11
jmp 0x51ff1e
cmp byte [ebp + 0x11], al
jne 0x51ff1e
cmp byte [ebp + 0x12], 0x1b
jne 0x51ff1e
cmp byte [ebp + 0x13], 0x4d
jne 0x51ff1e
mov edx, 0x14
mov ecx, dword [esp + 0x28]
xor esi, esi
xor eax, eax
cmp ecx, esi
jle 0x51ff39
cmp byte [eax + ebp], 0
jne 0x51ff34
mov byte [eax + ebp], 0x20
inc eax
cmp eax, ecx
jl 0x51ff2a
mov ecx, dword [ebx + 0x1a84]
mov edi, dword [ecx + 0x58]
mov eax, dword [ecx]
sub edi, edx
add edx, ebp
push edi
push edx
call dword [eax + 0x18]
test al, al
je 0x51ff99
mov eax, dword [ebx + 0x1a84]
mov cl, byte [eax + 0x31]
test cl, cl
je 0x51ff66
mov dword [eax + 0x58], esi
jmp 0x52021e
cmp dword [eax + 0x10], esi
jle 0x51ff8a
mov cl, byte [eax + 0x40]
mov edx, dword [eax + 0x3c]
push esi
push ecx
push edx
push esi
mov ecx, ebx
call fcn.0051f530
mov eax, dword [ebx + 0x1a84]
mov dword [eax + 0x58], esi
jmp 0x52021e
mov cl, byte [eax + 0x48]
test cl, cl
je 0x51ff99
mov dword [eax + 0x58], esi
jmp 0x52021e
mov ecx, dword [ebx + 0x1a84]
push str.UNLOCK
add ecx, 0x6f
push ecx
call dword [sym.imp.MSVCRT.dll_strstr]
add esp, 8
test eax, eax
jne 0x51fff6
mov al, byte [ebx + 0x1a88]
test al, al
jne 0x51fff6
mov eax, dword [ebx + 0x1a84]
mov cl, byte [eax + 0x51]
test cl, cl
jne 0x51fff6
mov dl, byte [eax + 0x40]
mov eax, dword [eax + 0x3c]
push esi
push edx
push eax
push str.UNLOCK01
mov ecx, ebx
call fcn.0051f530
mov ecx, dword [ebx + 0x1a84]
mov dword [ecx + 0x58], esi
mov byte [ebx + 0x1a88], 1
jmp 0x52021e
mov ecx, dword [ebx + 0x1a84]
mov byte [ebx + 0x1ad0], 1
mov edx, dword [ecx]
call dword [edx + 8]
mov al, byte [ebx + 0x1ad1]
test al, al
je 0x5201db
mov eax, dword [0x63ac20]
cmp eax, esi
je 0x52007e
mov cl, byte [eax + 0x40]
test cl, cl
je 0x52007e
add eax, 0x250
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x629d0c
push str._IF_
push esi
push ecx
mov ecx, esp
mov dword [esp + 0x38], esp
push 0x63547c
call sub.MFC42.DLL_CString::CString_3
mov eax, dword [0x63ac20]
push str.command
push str.esms
mov ecx, dword [eax + 0x44]
push ecx
call fcn.004ec710
mov edx, dword [0x63ac20]
add esp, 0x1c
mov eax, dword [edx + 0x248]
lea ecx, [edx + 0x248]
call dword [eax + 0x1c]
call fcn.0044c870
mov ecx, dword [eax + 0xd0]
cmp byte [ecx], 0
je 0x5200cc
push 0x629d0c
push ecx
mov ecx, esp
mov dword [esp + 0x30], esp
push str._IF_
call sub.MFC42.DLL_CString::CString_3
push ecx
mov dword [esp + 0x28], esi
mov ecx, esp
mov dword [esp + 0x1c], esp
push 0x63547c
call sub.MFC42.DLL_CString::CString_3
mov ecx, dword [0x635478]
mov dword [esp + 0x28], 0xffffffff
call fcn.00401160
mov eax, dword [0x635480]
cmp eax, esi
je 0x5201cb
mov ecx, dword [eax + 0x50]
xor ebp, ebp
cmp ecx, esi
jle 0x5201cb
mov edi, dword [sym.imp.MSVCRT.dll__mbsicmp]
mov edx, dword [eax + 0x4c]
mov esi, dword [edx + ebp*4]
test esi, esi
je 0x5201bd
mov cl, byte [esi + 0x88]
test cl, cl
je 0x5201bd
call fcn.0044c870
mov eax, dword [eax + 0xd0]
mov cl, byte [eax + 2]
test cl, cl
je 0x5201b8
mov ecx, dword [esi + 0x84]
mov eax, dword [ecx - 8]
test eax, eax
je 0x5201b8
push 0x63547c
lea ecx, [esp + 0x28]
call sub.MFC42.DLL_CString::CString_3
mov edx, dword [esp + 0x24]
mov dword [esp + 0x1c], 1
mov eax, dword [edx - 8]
test eax, eax
je 0x5201a7
mov al, byte [esi + 0x80]
test al, al
jne 0x5201a7
mov eax, dword [esi + 0x84]
push 0x63547c
push eax
call edi
add esp, 8
test eax, eax
jne 0x5201a7
push 0x629d0c
push ecx
mov ecx, esp
mov dword [esp + 0x30], esp
push str._IF_
call sub.MFC42.DLL_CString::CString_3
push ecx
mov byte [esp + 0x28], 2
mov ecx, esp
mov dword [esp + 0x1c], esp
push 0x63547c
call sub.MFC42.DLL_CString::CString_3
mov ecx, esi
mov byte [esp + 0x28], 1
call fcn.004024f0
lea ecx, [esp + 0x24]
mov dword [esp + 0x1c], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, dword [0x635480]
mov ecx, dword [eax + 0x50]
inc ebp
cmp ebp, ecx
jl 0x5200ec
xor esi, esi
mov eax, dword [ebx + 0x48]
mov ecx, ebx
push eax
call fcn.00520240
mov dword [ebx + 0x78], esi
jmp 0x520208
mov eax, dword [ebx + 0x1a84]
mov cl, byte [eax + 0x50]
test cl, cl
jne 0x5201fb
mov eax, dword [eax + 0x2c]
push 1
mov ecx, dword [eax - 8]
push ecx
push eax
mov ecx, ebx
call fcn.0051d430
jmp 0x520208
mov edx, dword [eax + 0x2c]
push 1
push edx
mov ecx, ebx
call fcn.0051d470
mov ecx, dword [ebx + 0x1a84]
cmp ecx, esi
je 0x520218
mov eax, dword [ecx]
push 1
call dword [eax]
mov dword [ebx + 0x1a84], esi
mov ecx, dword [esp + 0x14]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x10
ret 8