Function at 0x40a100
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45974c
mov eax, dword fs:[0]
push eax
sub esp, 0x450
mov eax, dword [0x4736c0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
push 0x103
xor esi, esi
lea eax, [ebp - 0x437]
mov ebx, ecx
push esi
push eax
mov dword [ebp - 0x444], ebx
mov byte [ebp - 0x438], 0
call fcn.00442fd0
add esp, 0xc
push 0x103
lea ecx, [ebp - 0x11f]
push esi
push ecx
mov byte [ebp - 0x120], 0
call fcn.00442fd0
add esp, 0xc
push 0x103
lea edx, [ebp - 0x32f]
push esi
push edx
mov byte [ebp - 0x330], 0
call fcn.00442fd0
add esp, 0xc
push 0x103
lea eax, [ebp - 0x227]
push esi
push eax
mov byte [ebp - 0x228], 0
call fcn.00442fd0
add esp, 0xc
lea ecx, [ebp - 0x438]
push ecx
push 0x104
mov dword [ebp - 0x450], esi
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov eax, dword [ebx + 0xd20d8]
cmp eax, dword [ebx + 0xd20dc]
mov dword [ebp - 0x43c], eax
jae 0x40a315
mov edx, eax
imul edx, edx, 0xd20
lea esi, [edx + ebx]
mov edi, 1
cmp dword [esi + 0x69dd8], edi
jne 0x40a2f2
cmp byte [esi + 0x694d8], 0
lea edi, [esi + 0x694d8]
jne 0x40a22a
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
lea eax, [ebp - 0x438]
push eax
push str._s_tgs_d.exe
push edi
mov eax, 0x100
call fcn.00407c80
add esp, 0x10
push 0x104
lea ecx, [ebp - 0x228]
push ecx
push 0
push 0
push 0x104
lea edx, [ebp - 0x330]
push edx
push 0x104
lea eax, [ebp - 0x120]
push eax
push edi
call fcn.004405f0
add esp, 0x24
lea ecx, [ebp - 0x330]
push ecx
lea edx, [ebp - 0x120]
push 0x104
push edx
call fcn.00440a6b
add esp, 0xc
lea ecx, [ebp - 0x120]
call fcn.0040aaa0
lea eax, [ebp - 0x228]
push 0x104
push eax
call fcn.00440bdf
lea ecx, [ebp - 0x228]
push str..exe
push ecx
call fcn.00440414
add esp, 0x10
test eax, eax
je 0x40a2b4
mov dword [esi + 0xdd8], 0
add dword [ebx + 0xd20d8], 1
push ecx
mov ecx, esp
mov dword [ebp - 0x440], esp
push edi
call fcn.004080b0
lea eax, [esi + 0x692d8]
mov ecx, ebx
call fcn.00409a10
xor edx, edx
test eax, eax
mov eax, dword [ebp - 0x43c]
setne dl
add eax, 1
mov dword [esi + 0x69ddc], edx
jmp 0x40a1cc
xor ecx, ecx
cmp dword [esi + 0x69de4], edi
mov dword [esi + 0x69de0], 0
sete cl
add eax, 1
mov dword [esi + 0x69ddc], ecx
jmp 0x40a1cc
xor eax, eax
cmp eax, dword [ebx + 0xd20dc]
mov dword [ebp - 0x44c], eax
jae 0x40a65f
imul eax, eax, 0xd20
lea esi, [eax + ebx]
mov eax, 1
cmp dword [esi + 0x69ddc], eax
jne 0x40a630
cmp dword [esi + 0x69de0], eax
jne 0x40a43d
push 0x104
lea edx, [ebp - 0x228]
push edx
push 0
push 0
push 0
push 0
push 0
lea edi, [esi + 0x694d8]
push 0
push edi
call fcn.004405f0
add esp, 0x24
lea eax, [ebp - 0x228]
push 0x104
push eax
call fcn.00440bdf
lea ecx, [ebp - 0x228]
push str..exe
push ecx
call fcn.00440414
add esp, 0x10
test eax, eax
jne 0x40a3b0
lea edx, [esi + 0x695d8]
push edx
call fcn.00409840
jmp 0x40a43d
lea eax, [ebp - 0x228]
push str..zip
push eax
call fcn.00440414
add esp, 8
test eax, eax
jne 0x40a43d
push eax
push eax
push eax
push eax
push 0x104
lea ecx, [ebp - 0x330]
push ecx
push 0x104
lea edx, [ebp - 0x120]
push edx
push edi
call fcn.004405f0
add esp, 0x24
lea eax, [ebp - 0x330]
push eax
lea ecx, [ebp - 0x120]
push 0x104
push ecx
call fcn.00440a6b
add esp, 0xc
lea edx, [ebp - 0x120]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
jne 0x40a431
lea ecx, [ebp - 0x120]
call fcn.0040aaa0
lea eax, [ebp - 0x120]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push edi
call fcn.0040ad90
push edi
call fcn.0040ae90
cmp dword [esi + 0x69dec], 1
jne 0x40a630
push str.http:__mediaupdate.tgsmedia.co.kr_app_index.php
lea ecx, [ebp - 0x448]
call fcn.004080b0
mov byte [ebp - 4], 1
call fcn.0042759d
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40a478
push 0x80004005
call fcn.00407f00
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x43c], eax
lea ecx, [ebp - 0x454]
push ecx
mov byte [ebp - 4], 2
call fcn.0040a880
mov byte [ebp - 4], 3
mov edx, dword [eax]
push edx
add esi, 0x690d8
push esi
push str.BomulBox
push 0x4616e4
lea eax, [ebp - 0x43c]
push str.modeimain_program_sinstaller_stitle_smac_s
push eax
call fcn.00408090
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x454]
add eax, 0xfffffff0
add esp, 0x18
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a4ec
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [ebp - 0x43c]
push ecx
mov ecx, dword [edi - 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
add edi, 0xfffffff0
mov dword [ebp - 0x45c], esp
mov ebx, esp
call eax
cmp dword [edi + 0xc], 0
lea ecx, [edi + 0xc]
jl 0x40a522
cmp eax, dword [edi]
jne 0x40a522
mov esi, edi
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x40a559
mov ecx, dword [edi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 1
push ecx
mov ecx, eax
call edx
mov esi, eax
test esi, esi
jne 0x40a53b
call fcn.004120f0
mov eax, dword [edi + 4]
mov dword [esi + 4], eax
mov eax, dword [edi + 4]
add eax, 1
push eax
lea ecx, [edi + 0x10]
push ecx
push eax
lea edx, [esi + 0x10]
push edx
call fcn.0043fe52
add esp, 0x10
add esi, 0x10
mov dword [ebx], esi
mov byte [ebp - 4], 4
mov esi, dword [ebp - 0x448]
push ecx
mov ecx, dword [esi - 0x10]
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
add esi, 0xfffffff0
mov dword [ebp - 0x440], esp
mov dword [ebp - 0x440], esp
call edx
cmp dword [esi + 0xc], 0
lea ecx, [esi + 0xc]
jl 0x40a59c
cmp eax, dword [esi]
jne 0x40a59c
mov ebx, esi
mov eax, 1
lock xadd dword [ecx], eax
jmp 0x40a5d3
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 1
push ecx
mov ecx, eax
call edx
mov ebx, eax
test ebx, ebx
jne 0x40a5b5
call fcn.004120f0
mov eax, dword [esi + 4]
mov dword [ebx + 4], eax
mov eax, dword [esi + 4]
add eax, 1
push eax
add esi, 0x10
push esi
push eax
lea ecx, [ebx + 0x10]
push ecx
call fcn.0043fe52
add esp, 0x10
mov edx, dword [ebp - 0x440]
add ebx, 0x10
mov dword [edx], ebx
mov byte [ebp - 4], 2
call fcn.0040a6b0
mov byte [ebp - 4], 1
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40a604
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x448]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a62a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [ebp - 0x444]
mov eax, dword [ebp - 0x44c]
add eax, 1
jmp 0x40a317
cmp dword [ebp + 8], 1
jne 0x40a678
mov ecx, dword [ebx + 0x20]
push 0
push 0x3e8
push 5
push ecx
call dword [sym.imp.USER32.dll_SetTimer]
mov dword [ebx + 0xd2368], 0
mov eax, dword [ebp - 0x450]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004404d0
mov esp, ebp
pop ebp
ret 4