Function at 0x505b74
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
mov dword [ebp - 0x44], ecx
xor eax, eax
mov al, byte [0x60220d]
and eax, 1
test eax, eax
jne 0x505bb9
mov cl, byte [0x60220d]
or cl, 1
mov byte [0x60220d], cl
push 0x181e
mov ecx, 0x600898
call fcn.005084e0
push 0x505eea
call fcn.0058ef7c
add esp, 4
mov edx, dword [ebp - 0x44]
cmp dword [edx + 0x14], 0
je 0x505c8f
push str.Req_TO_
mov ecx, dword [ebp - 0x44]
add ecx, 0xc
call fcn.00517721
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x44]
mov ecx, dword [ecx + 0x1c]
call sub.MFC42.DLL_CDumpContext::operator___2
push str._Id
mov edx, dword [ebp - 0x44]
mov ecx, dword [edx + 0x1c]
call sub.MFC42.DLL_CDumpContext::operator___1
mov ax, word [ebp + 0x10]
push eax
mov ecx, dword [ebp - 0x44]
mov ecx, dword [ecx + 0x1c]
call sub.MFC42.DLL_CDumpContext::operator__
push 0x5f80cc
mov edx, dword [ebp - 0x44]
mov ecx, dword [edx + 0x1c]
call sub.MFC42.DLL_CDumpContext::operator___1
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x48], 0
je 0x505c29
cmp dword [ebp - 0x48], 1
je 0x505c3b
jmp 0x505c4d
push str.ONACC
mov ecx, dword [ebp - 0x44]
mov ecx, dword [ecx + 0x1c]
call sub.MFC42.DLL_CDumpContext::operator___1
jmp 0x505c5d
push str.ONEXE
mov edx, dword [ebp - 0x44]
mov ecx, dword [edx + 0x1c]
call sub.MFC42.DLL_CDumpContext::operator___1
jmp 0x505c5d
push 0x5f80e0
mov eax, dword [ebp - 0x44]
mov ecx, dword [eax + 0x1c]
call sub.MFC42.DLL_CDumpContext::operator___1
push 0x5f80e8
mov ecx, dword [ebp - 0x44]
mov ecx, dword [ecx + 0x1c]
call sub.MFC42.DLL_CDumpContext::operator___1
mov edx, dword [ebp - 0x44]
mov eax, dword [edx + 0x1c]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
mov ecx, dword [ebp + 8]
call dword [edx + 0x10]
push 0x5f80ec
mov ecx, dword [ebp - 0x44]
add ecx, 0xc
call fcn.00517721
mov ecx, 0x600898
call fcn.005085b0
mov eax, dword [ebp + 8]
mov cx, word [ebp + 0x10]
mov word [eax + 0x14], cx
push 0x600898
mov edx, dword [ebp + 8]
mov eax, dword [edx]
mov ecx, dword [ebp + 8]
call dword [eax + 0x18]
lea ecx, [ebp - 4]
push ecx
mov dx, word [ebp + 0x10]
push edx
mov ecx, dword [ebp - 0x44]
add ecx, 0x338
call sub.MFC42.DLL_CMapWordToPtr::Lookup
test eax, eax
je 0x505cdc
push str.Internal_fapi_error:_duplicate_ID
mov ecx, dword [ebp - 0x44]
call fcn.00508388
mov ax, word [ebp + 0x10]
push eax
mov ecx, dword [ebp - 0x44]
add ecx, 0x338
call sub.MFC42.DLL_CMapWordToPtr::operator__
mov ecx, dword [ebp + 0x14]
mov dword [eax], ecx
mov dx, word [ebp + 0x10]
push edx
mov ecx, dword [ebp - 0x44]
add ecx, 0x354
call sub.MFC42.DLL_CMapWordToPtr::operator__
mov ecx, dword [ebp + 8]
mov dword [eax], ecx
cmp dword [ebp + 0xc], 0
jl 0x505d1c
mov edx, dword [ebp + 8]
mov dword [edx + 0x18], 1
mov ecx, 0x600898
call fcn.00508540
push eax
mov ecx, 0x600898
call fcn.00508560
push eax
push 4
mov eax, dword [ebp - 0x44]
mov ecx, dword [eax + 0x84]
call fcn.00518f99
cmp dword [ebp + 0xc], 0
jl 0x505edb
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp + 8]
cmp dword [ecx + 0x10], 0
jne 0x505e6a
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0xc]
cmp eax, dword [ebp + 0xc]
jae 0x505e6a
mov edx, dword [ebp - 0x44]
cmp dword [edx + 0x384], 0
je 0x505d92
int3
mov dword [ebp - 0x14], 0xa
mov dword [ebp - 0x18], 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x505e5d
mov ecx, dword [ebp - 0x10]
cmp ecx, dword [ebp - 0x30]
jne 0x505ddf
mov edx, dword [ebp - 0x18]
add edx, 1
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x14]
jle 0x505ddf
mov dword [ebp - 0x18], 0
jmp 0x505edf
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x10], ecx
cmp dword [ebp - 0x30], 0x12
jne 0x505dfa
push 0
call dword [sym.imp.USER32.dll_PostQuitMessage]
xor eax, eax
jmp 0x505ee1
cmp dword [ebp - 0x30], 0x112
jne 0x505e31
mov edx, dword [ebp - 0x2c]
and edx, 0xfff0
cmp edx, 0xf060
jne 0x505e31
mov eax, dword [ebp - 0x28]
push eax
mov ecx, dword [ebp - 0x2c]
push ecx
mov edx, dword [ebp - 0x30]
push edx
mov eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
xor eax, eax
jmp 0x505ee1
call sub.MFC42.DLL_AfxGetModuleThreadState
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp - 0x38]
mov ecx, dword [ecx + 4]
mov edx, dword [ebp - 0x38]
mov eax, dword [edx + 4]
mov edx, dword [eax]
call dword [edx + 0x64]
test eax, eax
jne 0x505e58
push 0
call dword [sym.imp.USER32.dll_PostQuitMessage]
jmp 0x505e5d
jmp 0x505da0
push 5
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x505d55
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0xc]
cmp eax, dword [ebp + 0xc]
jb 0x505e89
push str.Internal_fapi_error:_request_timeout
mov ecx, dword [ebp - 0x44]
call fcn.00508388
xor eax, eax
jmp 0x505ee1
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x10]
mov dword [ebp - 8], ecx
cmp dword [ebp - 8], 0
je 0x505ea2
mov edx, dword [ebp + 8]
mov dword [edx + 0x20], 1
mov eax, dword [ebp + 8]
cmp dword [eax + 0x24], 0
je 0x505ed6
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x40], ecx
mov edx, dword [ebp - 0x40]
mov dword [ebp - 0x3c], edx
cmp dword [ebp - 0x3c], 0
je 0x505ecf
push 1
mov eax, dword [ebp - 0x3c]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x3c]
call dword [edx + 4]
mov dword [ebp - 0x4c], eax
jmp 0x505ed6
mov dword [ebp - 0x4c], 0
mov eax, dword [ebp - 8]
jmp 0x505ee1
xor eax, eax
jmp 0x505ee1
jmp 0x505e65
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10