Function at 0x413670
Capabilities:
Check for time delay via gettickcount
Check if file exists
Get file size
Read file on windows

Disassembly:
sub esp, 8
push ebx
push ebp
push esi
mov ebp, ecx
mov eax, dword [ebp]
push edi
xor edi, edi
cmp eax, edi
je 0x413687
call fcn.00412bc0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, dword [esp + 0x1c]
push 0xffffffffffffffff
push 0x80
push 3
push edi
push 1
push 0xc0000000
push ebx
mov dword [ebp + 0x48], eax
mov dword [esp + 0x30], edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp + 0x40], eax
jne 0x4136fe
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 2
je 0x4136f2
push edi
call fcn.00416800
add esp, 4
test al, al
je 0x4136f2
push esi
push ebx
push str.CBitmapFile::Open__s_
push 0x7d
push str.DevelopLogin_trunkclientOnlineSetupV2CommonBitmapFile.cpp
push edi
call fcn.00416910
add esp, 0xc
push eax
call fcn.004168e0
add esp, 0x10
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret 4
push edi
lea ecx, [esp + 0x14]
push ecx
push 0x2c
lea esi, [ebp + 4]
push esi
push eax
mov dword [esp + 0x24], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x10], 0x2c
je 0x41374a
push edi
call fcn.00416800
add esp, 4
test al, al
je 0x413960
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push 0x441d28
push 0x87
push str.DevelopLogin_trunkclientOnlineSetupV2CommonBitmapFile.cpp
push edi
jmp 0x413894
xor edx, edx
mov ecx, 2
mov edi, str.GGDLBMP
repe cmpsd dword [esi], dword es:[edi]
push edx
je 0x413778
call fcn.00416800
add esp, 4
test al, al
je 0x413960
push ebx
push str.CBitmapFile::Open__s__
push 0x8c
jmp 0x413799
cmp dword [ebp + 0xc], 1
je 0x4137b6
call fcn.00416800
add esp, 4
test al, al
je 0x413960
push ebx
push 0x441cdc
push 0x92
push str.DevelopLogin_trunkclientOnlineSetupV2CommonBitmapFile.cpp
push 0
call fcn.00416910
add esp, 0xc
push eax
call fcn.004168e0
add esp, 0xc
jmp 0x413960
mov eax, dword [ebp + 0x10]
test eax, eax
jg 0x4137e1
call fcn.00416800
add esp, 4
test al, al
je 0x413960
mov eax, dword [ebp + 0x10]
push eax
push ebx
push 0x441cb0
push 0x98
jmp 0x41388d
mov ecx, dword [ebp + 0x40]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [ebp + 0x20]
test ecx, ecx
mov esi, dword [ebp + 0x1c]
mov dword [esp + 0x1c], eax
jl 0x413927
jg 0x413807
test esi, esi
jb 0x413927
cmp ecx, 1
jg 0x413927
jl 0x41381a
test esi, esi
ja 0x413927
mov eax, dword [ebp + 0x10]
test eax, eax
jg 0x413825
xor esi, esi
jmp 0x41383f
cdq
mov edi, eax
add edi, esi
mov esi, edx
adc esi, ecx
push edx
sub edi, 1
push eax
sbb esi, 0
push esi
push edi
call fcn.00421670
mov esi, eax
mov ecx, dword [esp + 0x1c]
lea eax, [esi + 0x100]
cmp eax, ecx
je 0x4138aa
mov edx, dword [ebp + 0x40]
push 0
push 0
push eax
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x4138aa
push eax
call fcn.00416800
add esp, 4
test al, al
je 0x413960
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push 0x441c80
push 0xaf
push str.DevelopLogin_trunkclientOnlineSetupV2CommonBitmapFile.cpp
push 0
call fcn.00416910
add esp, 0xc
push eax
call fcn.004168e0
add esp, 0x10
jmp 0x413960
mov ecx, dword [ebp + 0x34]
test ecx, ecx
lea edi, [ebp + 0x30]
mov byte [esp + 0x1c], 0
jne 0x4138bd
xor eax, eax
jmp 0x4138c2
mov eax, dword [edi + 8]
sub eax, ecx
cmp eax, esi
jae 0x4138e8
test ecx, ecx
jne 0x4138ce
xor eax, eax
jmp 0x4138d3
mov eax, dword [edi + 8]
sub eax, ecx
mov ecx, dword [edi + 8]
lea edx, [esp + 0x1c]
push edx
sub esi, eax
push esi
push ecx
mov ecx, edi
call fcn.00404730
jmp 0x413911
test ecx, ecx
je 0x413911
mov eax, dword [edi + 8]
mov edx, eax
sub edx, ecx
cmp esi, edx
jae 0x413911
add ecx, esi
cmp ecx, eax
je 0x413911
mov esi, eax
sub esi, eax
push esi
push eax
push ecx
call fcn.00420770
add esp, 0xc
add eax, esi
mov dword [edi + 8], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp + 0x2c]
mov dword [ebp + 0x48], eax
mov dword [esp + 0x14], 1
jmp 0x413976
push 0
call fcn.00416800
add esp, 4
test al, al
je 0x413960
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp + 0x1c]
push eax
push ecx
push ebx
push 0x441c54
push 0xa2
push str.DevelopLogin_trunkclientOnlineSetupV2CommonBitmapFile.cpp
push 0
call fcn.00416910
add esp, 0xc
push eax
call fcn.004168e0
add esp, 0x14
mov eax, dword [ebp + 0x40]
cmp eax, 0xffffffff
je 0x413976
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp + 0x40], 0xffffffff
mov esi, dword [esp + 0x14]
mov ecx, ebp
mov dword [ebp], esi
call fcn.00412850
mov ecx, dword [ebp + 0x34]
test ecx, ecx
jne 0x41398f
xor eax, eax
jmp 0x413994
mov eax, dword [ebp + 0x38]
sub eax, ecx
add eax, 0xf
cdq
and edx, 0xf
add eax, edx
sar eax, 4
cmp eax, 5
jl 0x4139aa
mov eax, 5
mov ecx, ebp
mov dword [ebp + 0x44], eax
call fcn.004130a0
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 8
ret 4