Function at 0x401630
Capabilities:
Get common file path
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x43a136
mov eax, dword fs:[0]
push eax
sub esp, 0x258
mov eax, dword [0x44a5d0]
xor eax, esp
mov dword [esp + 0x250], eax
push ebx
push esi
push edi
mov eax, dword [0x44a5d0]
xor eax, esp
push eax
lea eax, [esp + 0x268]
mov dword fs:[0], eax
mov edi, ecx
call fcn.00409233
mov eax, dword [edi + 0x74]
mov ebx, dword [sym.imp.USER32.dll_SendMessageA]
push eax
mov eax, dword [edi + 0x20]
push 1
push 0x80
push eax
call ebx
mov eax, dword [edi + 0x74]
mov ecx, dword [edi + 0x20]
push eax
xor esi, esi
push esi
push 0x80
push ecx
call ebx
push 0xff
lea edx, [esp + 0x161]
push esi
push edx
mov byte [esp + 0x168], 0
call fcn.004249b0
add esp, 0xc
lea eax, [esp + 0x15c]
push eax
push 0x100
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea ecx, [esp + 0x15c]
push ecx
lea edx, [edi + 0xbc]
push 0x440bd0
push edx
call fcn.00405760
add esp, 0xc
call fcn.004123f8
xor ecx, ecx
cmp eax, esi
setne cl
cmp ecx, esi
jne 0x401707
push 0x80004005
call fcn.004052a0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea ebx, [eax + 0x10]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x270], esi
mov eax, dword [ebx - 8]
mov ecx, 1
sub ecx, dword [ebx - 4]
sub eax, 0x100
or eax, ecx
jge 0x401744
push 0x100
lea ecx, [esp + 0x1c]
call fcn.00405650
mov ebx, dword [esp + 0x18]
push 0x100
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0x440bd4
push ebx
mov dword [esp + 0x1c], esi
call fcn.00422837
mov esi, eax
add esp, 8
test esi, esi
je 0x401907
lea ecx, [esp + 0x2c]
push ecx
push ebx
call fcn.00422f02
mov edx, dword [esp + 0x48]
lea eax, [esp + 0x2c]
push eax
add edx, 0xfffffffc
xor ebx, ebx
push esi
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], ebx
call fcn.004228a5
push esi
push 1
lea ecx, [esp + 0x2c]
push 4
push ecx
call fcn.00422b83
mov edx, dword [esp + 0x34]
lea eax, [esp + 0x44]
push eax
push esi
mov dword [esp + 0x4c], edx
mov dword [esp + 0x50], ebx
call fcn.004228a5
push esi
push 1
lea ecx, [esp + 0x4c]
push 4
push ecx
call fcn.00422b83
mov edx, dword [esp + 0x54]
add edx, 1
push edx
call fcn.00422bed
mov ebx, eax
mov eax, dword [esp + 0x58]
push esi
push eax
push 1
push ebx
call fcn.00422b83
mov ecx, dword [esp + 0x68]
add esp, 0x4c
push ebx
lea eax, [edi + 0x1bc]
push 0x440bd0
push eax
mov byte [ebx + ecx], 0
call fcn.00405760
push ebx
call fcn.00422cb0
push 0xff
lea edx, [esp + 0x71]
push 0
push edx
mov byte [esp + 0x78], 0
call fcn.004249b0
push esi
push 1
lea eax, [esp + 0x38]
push 4
push eax
call fcn.00422b83
push esi
push 1
lea ecx, [esp + 0x48]
push 4
push ecx
call fcn.00422b83
push esi
push 1
lea edx, [esp + 0x58]
push 4
push edx
call fcn.00422b83
mov eax, dword [esp + 0x60]
add esp, 0x4c
push esi
push eax
lea ecx, [esp + 0x64]
push 1
push ecx
call fcn.00422b83
mov edx, dword [esp + 0x24]
push esi
mov byte [esp + edx + 0x70], 0
call fcn.00422db0
mov eax, dword [edi + 0x1bc]
add esp, 0x14
push eax
push 0x3f0
mov ecx, edi
call fcn.0040ffcc
call fcn.004123f8
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4018a0
push 0x80004005
call fcn.004052a0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x20], eax
lea ecx, [esp + 0x5c]
push ecx
lea edx, [esp + 0x24]
push 0x440bd8
push edx
mov byte [esp + 0x27c], 1
call fcn.00405760
mov esi, dword [esp + 0x2c]
add esp, 0xc
push esi
lea ecx, [edi + 0x114]
call fcn.00410081
lea eax, [esi - 0x10]
mov byte [esp + 0x270], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401903
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [esp + 0x18]
lea eax, [ebx - 0x10]
mov dword [esp + 0x270], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40192e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x268]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x250]
xor ecx, esp
call fcn.00421f10
mov esp, ebp
pop ebp
ret