Function at 0x40b230
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e2d4b
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
mov eax, dword [0x530400]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x44], edi
lea ecx, [ebp - 0x45]
call fcn.00407dc0
push dword [edi + 4]
lea ecx, [edi + 0x4c0]
call dword [0x50b080]
push 0
push 0
lea ecx, [edi + 0x4c0]
call dword [0x50b088]
push 3
lea ecx, [edi + 0x4c0]
call dword [0x50b084]
mov esi, dword [sym.RedAlert.exe_public:_class_DuiLib::CControlUI____thiscall_DuiLib::CPaintManagerUI::FindControl_wchar_t_const__const]
add edi, 0x2c
push 0x4e7b90
mov ecx, edi
call esi
mov ecx, dword [ebp - 0x44]
push 0x4e7b9c
mov dword [ecx + 0x504], eax
mov ecx, edi
call esi
mov ecx, dword [ebp - 0x44]
push 0x4e7ba8
mov dword [ecx + 0x508], eax
mov ecx, edi
call esi
mov ecx, dword [ebp - 0x44]
push str.browse
mov dword [ecx + 0x50c], eax
mov ecx, edi
call esi
mov ecx, dword [ebp - 0x44]
push str.download
mov dword [ecx + 0x510], eax
mov ecx, edi
call esi
mov ecx, dword [ebp - 0x44]
push str.pro_text
mov dword [ecx + 0x514], eax
mov ecx, edi
call esi
mov ecx, dword [ebp - 0x44]
push 0x4e7bec
mov dword [ecx + 0x518], eax
mov ecx, edi
call esi
mov edi, dword [ebp - 0x44]
mov dword [edi + 0x51c], eax
mov eax, dword [0x531e84]
test eax, eax
jne 0x40b368
push 0x1e0
call fcn.004bbaae
mov esi, eax
add esp, 4
mov dword [ebp - 0x44], esi
mov dword [ebp - 4], 0
test esi, esi
je 0x40b35a
push 0x1e0
push 0
push esi
call fcn.004bda10
add esp, 0xc
mov ecx, esi
call fcn.0040e1c0
jmp 0x40b35c
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov dword [0x531e84], eax
lea ecx, [ebp - 0x40]
push ecx
mov ecx, eax
call fcn.0040ef00
cmp dword [ebp - 0x30], 0
mov dword [ebp - 4], 1
je 0x40b3dc
cmp dword [ebp - 0x2c], 0xf
lea eax, [ebp - 0x40]
cmova eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x40b3dc
cmp dword [edi + 0x504], 0
je 0x40b3dc
cmp dword [ebp - 0x2c], 0xf
lea eax, [ebp - 0x40]
cmova eax, dword [ebp - 0x40]
push eax
lea eax, [ebp - 0x78]
push eax
call fcn.00401c90
add esp, 8
cmp dword [eax + 0x14], 7
mov byte [ebp - 4], 2
jbe 0x40b3c3
mov eax, dword [eax]
mov ecx, dword [edi + 0x504]
push eax
call dword [0x50b06c]
lea ecx, [ebp - 0x78]
mov byte [ebp - 4], 1
call fcn.00403110
mov eax, dword [0x531e84]
test eax, eax
jne 0x40b423
push 0x1e0
call fcn.004bbaae
mov esi, eax
add esp, 4
mov dword [ebp - 0x44], esi
mov byte [ebp - 4], 3
test esi, esi
je 0x40b418
push 0x1e0
push 0
push esi
call fcn.004bda10
add esp, 0xc
mov ecx, esi
call fcn.0040e1c0
jmp 0x40b41a
xor eax, eax
mov byte [ebp - 4], 1
mov dword [0x531e84], eax
mov ecx, eax
call fcn.0040eca0
mov esi, eax
cmp esi, 0xffffffff
jne 0x40b481
call fcn.0040ce80
mov ecx, eax
call fcn.0040ecb0
mov ecx, dword [eax + 4]
sub ecx, dword [eax]
mov eax, 0x3e0f83e1
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x40b481
call fcn.0040ce80
mov ecx, eax
call fcn.0040ecb0
mov ecx, dword [eax + 4]
mov esi, dword [eax]
sub ecx, esi
mov eax, 0x3e0f83e1
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x40b7fc
mov esi, dword [esi]
cmp dword [edi + 0x508], 0
je 0x40b527
call fcn.0040ce80
mov ecx, eax
call fcn.0040ecb0
mov ecx, dword [eax]
mov eax, dword [eax + 4]
cmp ecx, eax
je 0x40b527
cmp esi, dword [ecx]
je 0x40b4b7
add ecx, 0x84
cmp ecx, eax
jne 0x40b4a7
jmp 0x40b527
add ecx, 0xc
cmp dword [ecx + 0x14], 0xf
jbe 0x40b4c2
mov ecx, dword [ecx]
push ecx
lea eax, [ebp - 0x60]
push eax
call fcn.00401c90
add esp, 8
mov edx, eax
cmp dword [edx + 0x14], 7
mov byte [ebp - 4], 4
jbe 0x40b4dd
mov edx, dword [edx]
mov ecx, dword [edi + 0x508]
push edx
mov eax, dword [ecx]
call dword [eax + 0x3c]
mov ecx, dword [ebp - 0x4c]
mov byte [ebp - 4], 1
cmp ecx, 7
jbe 0x40b527
mov edx, dword [ebp - 0x60]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40b51d
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b801
push ecx
push edx
call fcn.004bbade
add esp, 8
mov ecx, dword [edi + 0x50c]
test ecx, ecx
je 0x40b6ed
mov eax, dword [ecx]
push 0
call dword [eax + 0xec]
xorps xmm0, xmm0
mov dword [ebp - 0x18], 0
xor eax, eax
mov dword [ebp - 0x14], 7
movups xmmword [ebp - 0x28], xmm0
mov word [ebp - 0x28], ax
push 0x4e7c00
mov byte [ebp - 4], 5
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x40b574
mov ecx, 0x4e7c04
jmp 0x40b58e
push 0x4e7c0c
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
mov ecx, 0x4e7c10
mov edx, 0x50ae94
cmove ecx, edx
push ecx
lea ecx, [ebp - 0x28]
call fcn.00409730
cmp dword [ebp - 0x18], 0
je 0x40b6af
push 5
push 0x4e7c18
lea ecx, [ebp - 0x28]
call fcn.0040d1b0
push 1
push 0x4e7b8c
lea ecx, [ebp - 0x28]
call fcn.0040d1b0
lea eax, [ebp - 0x78]
push esi
push eax
call fcn.00401890
add esp, 8
cmp dword [eax + 0x14], 0xf
mov byte [ebp - 4], 6
jbe 0x40b5d8
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x60]
push eax
call fcn.00401c90
add esp, 8
cmp dword [eax + 0x14], 7
mov ecx, eax
mov byte [ebp - 4], 7
jbe 0x40b5f3
mov ecx, dword [eax]
push dword [eax + 0x10]
push ecx
lea ecx, [ebp - 0x28]
call fcn.0040d1b0
mov ecx, dword [ebp - 0x4c]
mov byte [ebp - 4], 6
cmp ecx, 7
jbe 0x40b63d
mov edx, dword [ebp - 0x60]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40b633
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b806
push ecx
push edx
call fcn.004bbade
add esp, 8
mov ecx, dword [ebp - 0x64]
xor eax, eax
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 7
mov word [ebp - 0x60], ax
mov byte [ebp - 4], 5
cmp ecx, 0xf
jbe 0x40b689
mov edx, dword [ebp - 0x78]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40b67f
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b806
push ecx
push edx
call fcn.004bbade
add esp, 8
push 1
push 0x4e7b8c
lea ecx, [ebp - 0x28]
call fcn.0040d1b0
mov ecx, dword [edi + 0x50c]
lea edx, [ebp - 0x28]
cmp dword [ebp - 0x14], 7
cmova edx, dword [ebp - 0x28]
mov eax, dword [ecx]
push edx
call dword [eax + 0x3c]
mov ecx, dword [ebp - 0x14]
mov byte [ebp - 4], 1
cmp ecx, 7
jbe 0x40b6ed
mov edx, dword [ebp - 0x28]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40b6e3
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b80b
push ecx
push edx
call fcn.004bbade
add esp, 8
mov eax, dword [0x531e84]
test eax, eax
jne 0x40b734
push 0x1e0
call fcn.004bbaae
mov esi, eax
add esp, 4
mov dword [ebp - 0x44], esi
mov byte [ebp - 4], 8
test esi, esi
je 0x40b729
push 0x1e0
push 0
push esi
call fcn.004bda10
add esp, 0xc
mov ecx, esi
call fcn.0040e1c0
jmp 0x40b72b
xor eax, eax
mov byte [ebp - 4], 1
mov dword [0x531e84], eax
lea ecx, [ebp - 0x78]
push ecx
mov ecx, eax
call fcn.0040ef30
mov esi, eax
add edi, 0x53c
cmp edi, esi
je 0x40b773
mov ecx, edi
call fcn.00403170
movups xmm0, xmmword [esi]
movups xmmword [edi], xmm0
movq xmm0, qword [esi + 0x10]
movq qword [edi + 0x10], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0xf
mov byte [esi], 0
mov ecx, dword [ebp - 0x64]
cmp ecx, 0xf
jbe 0x40b7a3
mov edx, dword [ebp - 0x78]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40b799
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b810
push ecx
push edx
call fcn.004bbade
add esp, 8
push 0xa
push str.config.ini
mov ecx, edi
call fcn.004024e0
mov ecx, dword [ebp - 0x2c]
cmp ecx, 0xf
jbe 0x40b7e1
mov edx, dword [ebp - 0x40]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40b7d7
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40b815
push ecx
push edx
call fcn.004bbade
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004bbaec
mov esp, ebp
pop ebp
ret
call fcn.0040d1a0
call fcn.004bff0f
call fcn.004bff0f
call fcn.004bff0f
call fcn.004bff0f
call fcn.004bff0f
int3