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

Disassembly:
push 0xffffffffffffffff
push 0x5bc038
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 0x51ff2e
mov edx, dword [esp + 0x28]
lea ebp, [eax + 0x5c]
mov eax, dword [eax + 0x58]
lea ecx, [eax + edx]
cmp ecx, 0x4000
jge 0x51fb53
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 0x51fb83
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 0x51fbdd
mov eax, dword [ebx + 0x1a84]
cmp dword [eax + 0x58], 0x12
jle 0x51fbc1
cmp byte [ebp], 1
jne 0x51fbc1
mov cl, byte [ebp + 1]
test cl, cl
jne 0x51fbc1
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 0x51fbdd
cmp ecx, 0x3fff
jne 0x51ff2e
cmp byte [ebx + 0x1adc], 1
jne 0x51fc03
mov eax, dword [ebx + 0x1a84]
mov edx, dword [eax + 0x58]
sub edx, 0x13
cmp edx, 4
jge 0x51fc03
mov dword [eax + 0x58], 0
jmp 0x51ff2e
mov cl, byte [ebp + 0x10]
mov al, 0xf
cmp cl, al
mov edx, 0x13
jne 0x51fc18
mov edx, 0x11
jmp 0x51fc2e
cmp byte [ebp + 0x11], al
jne 0x51fc2e
cmp byte [ebp + 0x12], 0x1b
jne 0x51fc2e
cmp byte [ebp + 0x13], 0x4d
jne 0x51fc2e
mov edx, 0x14
mov ecx, dword [esp + 0x28]
xor esi, esi
xor eax, eax
cmp ecx, esi
jle 0x51fc49
cmp byte [eax + ebp], 0
jne 0x51fc44
mov byte [eax + ebp], 0x20
inc eax
cmp eax, ecx
jl 0x51fc3a
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 0x51fca9
mov eax, dword [ebx + 0x1a84]
mov cl, byte [eax + 0x31]
test cl, cl
je 0x51fc76
mov dword [eax + 0x58], esi
jmp 0x51ff2e
cmp dword [eax + 0x10], esi
jle 0x51fc9a
mov cl, byte [eax + 0x40]
mov edx, dword [eax + 0x3c]
push esi
push ecx
push edx
push esi
mov ecx, ebx
call fcn.0051f240
mov eax, dword [ebx + 0x1a84]
mov dword [eax + 0x58], esi
jmp 0x51ff2e
mov cl, byte [eax + 0x48]
test cl, cl
je 0x51fca9
mov dword [eax + 0x58], esi
jmp 0x51ff2e
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 0x51fd06
mov al, byte [ebx + 0x1a88]
test al, al
jne 0x51fd06
mov eax, dword [ebx + 0x1a84]
mov cl, byte [eax + 0x51]
test cl, cl
jne 0x51fd06
mov dl, byte [eax + 0x40]
mov eax, dword [eax + 0x3c]
push esi
push edx
push eax
push str.UNLOCK01
mov ecx, ebx
call fcn.0051f240
mov ecx, dword [ebx + 0x1a84]
mov dword [ecx + 0x58], esi
mov byte [ebx + 0x1a88], 1
jmp 0x51ff2e
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 0x51feeb
mov eax, dword [0x63ac10]
cmp eax, esi
je 0x51fd8e
mov cl, byte [eax + 0x40]
test cl, cl
je 0x51fd8e
add eax, 0x250
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x629cf4
push str._IF_
push esi
push ecx
mov ecx, esp
mov dword [esp + 0x38], esp
push 0x63546c
call sub.MFC42.DLL_CString::CString_3
mov eax, dword [0x63ac10]
push str.command
push str.esms
mov ecx, dword [eax + 0x44]
push ecx
call fcn.004ec730
mov edx, dword [0x63ac10]
add esp, 0x1c
mov eax, dword [edx + 0x248]
lea ecx, [edx + 0x248]
call dword [eax + 0x1c]
call fcn.0044c8d0
mov ecx, dword [eax + 0xd0]
cmp byte [ecx], 0
je 0x51fddc
push 0x629cf4
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 0x63546c
call sub.MFC42.DLL_CString::CString_3
mov ecx, dword [0x635468]
mov dword [esp + 0x28], 0xffffffff
call fcn.00401150
mov eax, dword [0x635470]
cmp eax, esi
je 0x51fedb
mov ecx, dword [eax + 0x50]
xor ebp, ebp
cmp ecx, esi
jle 0x51fedb
mov edi, dword [sym.imp.MSVCRT.dll__mbsicmp]
mov edx, dword [eax + 0x4c]
mov esi, dword [edx + ebp*4]
test esi, esi
je 0x51fecd
mov cl, byte [esi + 0x88]
test cl, cl
je 0x51fecd
call fcn.0044c8d0
mov eax, dword [eax + 0xd0]
mov cl, byte [eax + 2]
test cl, cl
je 0x51fec8
mov ecx, dword [esi + 0x84]
mov eax, dword [ecx - 8]
test eax, eax
je 0x51fec8
push 0x63546c
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 0x51feb7
mov al, byte [esi + 0x80]
test al, al
jne 0x51feb7
mov eax, dword [esi + 0x84]
push 0x63546c
push eax
call edi
add esp, 8
test eax, eax
jne 0x51feb7
push 0x629cf4
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 0x63546c
call sub.MFC42.DLL_CString::CString_3
mov ecx, esi
mov byte [esp + 0x28], 1
call fcn.004024d0
lea ecx, [esp + 0x24]
mov dword [esp + 0x1c], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, dword [0x635470]
mov ecx, dword [eax + 0x50]
inc ebp
cmp ebp, ecx
jl 0x51fdfc
xor esi, esi
mov eax, dword [ebx + 0x48]
mov ecx, ebx
push eax
call fcn.0051ff50
mov dword [ebx + 0x78], esi
jmp 0x51ff18
mov eax, dword [ebx + 0x1a84]
mov cl, byte [eax + 0x50]
test cl, cl
jne 0x51ff0b
mov eax, dword [eax + 0x2c]
push 1
mov ecx, dword [eax - 8]
push ecx
push eax
mov ecx, ebx
call fcn.0051d140
jmp 0x51ff18
mov edx, dword [eax + 0x2c]
push 1
push edx
mov ecx, ebx
call fcn.0051d180
mov ecx, dword [ebx + 0x1a84]
cmp ecx, esi
je 0x51ff28
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