Function at 0x405680
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x43c576
mov eax, dword fs:[0]
push eax
sub esp, 0x7f8
mov eax, dword [0x447034]
xor eax, esp
mov dword [esp + 0x7f0], eax
push ebx
push esi
push edi
mov eax, dword [0x447034]
xor eax, esp
push eax
lea eax, [esp + 0x808]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor edi, edi
push 0x206
mov ebx, ecx
lea ecx, [esp + 0x3f2]
push edi
push ecx
mov dword [esp + 0x20], eax
mov word [esp + 0x3f8], di
call fcn.0042a8d0
add esp, 0xc
push 0x206
lea edx, [esp + 0x5fa]
push edi
push edx
mov word [esp + 0x600], di
call fcn.0042a8d0
add esp, 0xc
push 0x1ac
lea eax, [esp + 0x3c]
push edi
push eax
mov dword [esp + 0x40], edi
call fcn.0042a8d0
add esp, 0xc
mov dword [esp + 0x30], 7
mov dword [esp + 0x2c], edi
mov word [esp + 0x1c], di
mov dword [esp + 0x810], edi
mov edx, dword [0x44951c]
mov eax, dword [edx + 0xc]
mov ecx, 0x44951c
call eax
add eax, 0x10
mov dword [esp + 0x10], eax
push 0x206
lea ecx, [esp + 0x1ea]
push edi
mov byte [esp + 0x818], 1
push ecx
mov word [esp + 0x1f0], di
call fcn.0042a8d0
mov ecx, dword [ebx + 0x28]
mov eax, dword [ecx + 0x70]
add esp, 0xc
cmp dword [ecx + 0x74], 8
jb 0x405784
mov ecx, dword [ecx + 0x60]
jmp 0x405787
add ecx, 0x60
cmp eax, 0x7ffffffe
jbe 0x40579b
mov word [esp + 0x1e4], di
jmp 0x4058e9
push ecx
mov edx, 0x104
lea ecx, [esp + 0x1e8]
call fcn.00403ce0
cmp eax, edi
jl 0x4058e9
lea edx, [esp + 0x1e4]
push edx
call dword [sym.imp.SHLWAPI.dll_PathStripPathW]
lea eax, [esp + 0x1e4]
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x4057d0
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x1e8]
push eax
lea esi, [esp + 0x20]
call fcn.00407ac0
push ebx
lea ecx, [esp + 0x38]
mov edx, esi
call fcn.00404ee0
test eax, eax
je 0x4058e9
mov edx, dword [ebx + 0x24]
push 0x104
lea ecx, [esp + 0x3f0]
push ecx
push 0x6f
push edx
mov dword [esp + 0x48], edi
call dword [sym.imp.USER32.dll_LoadStringW]
lea eax, [esp + 0x3c]
push eax
lea ecx, [esp + 0x3f0]
push ecx
lea edx, [esp + 0x5fc]
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
mov ecx, dword [ebx + 4]
add esp, 0xc
lea eax, [esp + 0x5f4]
push eax
push 0x40c
push ecx
call dword [sym.imp.USER32.dll_SetDlgItemTextW]
mov edx, dword [ebx + 4]
push 0x40c
push edx
call dword [sym.imp.USER32.dll_GetDlgItem]
push 5
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [esp + 0x34]
push eax
lea ecx, [esp + 0x14]
call fcn.00405300
cmp eax, edi
jge 0x40589c
mov ecx, str.0.0.0.0
call fcn.004031f0
push str.0.0.0.0
lea ecx, [esp + 0x14]
push ecx
mov ebx, eax
call fcn.004027d0
mov edx, dword [esp + 0x10]
push edx
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x19c]
push ecx
mov ecx, dword [esp + 0x44]
lea edx, [esp + 0x150]
push edx
mov edx, dword [esp + 0x44]
lea eax, [esp + 0x104]
push eax
mov eax, dword [esp + 0x28]
push ecx
push edx
push eax
lea edx, [esp + 0xc4]
lea ecx, [esp + 0x5c]
call fcn.00418290
add esp, 0x20
test eax, eax
je 0x4058e9
mov edi, 1
mov byte [esp + 0x810], 0
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405911
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x810], 0xffffffff
cmp dword [esp + 0x30], 8
jb 0x405930
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.004282af
add esp, 4
mov eax, edi
mov ecx, dword [esp + 0x808]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x7f0]
xor ecx, esp
call fcn.004282a0
mov esp, ebp
pop ebp
ret 4