Function at 0x405cd0
Capabilities:
Check if file exists
Delete file
Move file

Disassembly:
push 0xffffffffffffffff
push 0x5205e8
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push ebp
push esi
push edi
mov eax, dword [0x576fe4]
xor eax, esp
push eax
lea eax, [esp + 0x34]
mov dword fs:[0], eax
mov edi, ecx
mov dword [esp + 0x3c], 0
call fcn.00418420
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x405d1b
push 0x80004005
call fcn.00401210
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0x44]
push str.interezen_rootca.key
push ecx
lea edx, [esp + 0x20]
push str.genrsa__out___s_s__2048
push edx
mov byte [esp + 0x4c], 1
call fcn.00402f20
mov eax, dword [esp + 0x28]
add esp, 0x10
push 0x1388
push 1
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x34], esp
mov esi, esp
push eax
call fcn.00401c50
add eax, 0x10
mov dword [esi], eax
mov ecx, esp
mov dword [esp + 0x34], esp
push 0x530c18
mov byte [esp + 0x50], 2
call fcn.00403850
mov eax, dword [esp + 0x54]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x34], esp
mov esi, esp
push eax
mov byte [esp + 0x54], 3
call fcn.00401c50
add eax, 0x10
mov dword [esi], eax
add esp, 4
mov ecx, edi
mov byte [esp + 0x50], 1
call fcn.004049e0
call fcn.00418420
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x405dc8
push 0x80004005
call fcn.00401210
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x20], eax
mov byte [esp + 0x3c], 4
call fcn.00418420
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x405df7
push 0x80004005
call fcn.00401210
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
mov ecx, dword [esp + 0x44]
push str.interezen_rootca.key
push ecx
lea edx, [esp + 0x28]
push 0x52fde4
push edx
mov byte [esp + 0x4c], 5
call fcn.00402f20
mov ebp, dword [esp + 0x30]
add esp, 0x10
push ebp
mov bl, 1
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x405eaf
push 0x52fec4
push ebp
call fcn.005060c6
add esp, 8
mov dword [esp + 0x24], eax
test eax, eax
je 0x405e81
push 2
push 0
push eax
call fcn.00505f7d
mov eax, dword [esp + 0x30]
push eax
call fcn.00505e85
mov ecx, dword [esp + 0x34]
push ecx
mov dword [esp + 0x3c], eax
call fcn.00505c6c
add esp, 0x14
cmp dword [esp + 0x28], 0
jne 0x405ed8
push ebp
lea edx, [esp + 0x20]
push str.openssl_key_file_size_is_0__s_
push edx
call fcn.00402f20
mov eax, dword [esp + 0x28]
push eax
push 0xcae
push str.CI3GSvcManagerApp::WorkCerts
call fcn.00403910
add esp, 0x18
push ebp
xor bl, bl
call esi
jmp 0x405ed8
push ebp
lea ecx, [esp + 0x20]
push str.openssl_key_file_not_exist__s_
push ecx
call fcn.00402f20
mov edx, dword [esp + 0x28]
push edx
push 0xcb8
push str.CI3GSvcManagerApp::WorkCerts
call fcn.00403910
add esp, 0x18
xor bl, bl
call fcn.00418420
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x405ef2
push 0x80004005
call fcn.00401210
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x24], eax
mov ecx, dword [esp + 0x44]
push str.irk.opt
push ecx
lea edx, [esp + 0x2c]
push 0x52fde4
push edx
mov byte [esp + 0x4c], 6
call fcn.00402f20
add esp, 0x10
test bl, bl
mov ebx, dword [esp + 0x24]
jne 0x405f76
push 1
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
jne 0x405f76
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebp
push ebx
push eax
lea eax, [esp + 0x28]
push str.rename_failed__d___s___s_
push eax
call fcn.00402f20
mov ecx, dword [esp + 0x30]
push ecx
push 0xcc8
push str.CI3GSvcManagerApp::WorkCerts
call fcn.00403910
add esp, 0x20
push 0
push 0
push 0x530b64
call fcn.00416878
push ebx
call esi
mov eax, dword [esp + 0x44]
push str.interezen_rootca.crt
push eax
push str.interezen_rootca.key
push eax
push 0x530b40
push eax
lea edx, [esp + 0x30]
push str.req__config___s_s___x509__new__nodes__key___s_s___sha256__days_7300__out___s_s___subj___emailAddressHJKIM_INTEREZEN.CO.KR_CNINTEREZEN_CA_OUINTEREZEN_OINTEREZEN_LSEOUL_STSEOUL_CKR_
push edx
call fcn.00402f20
mov eax, dword [esp + 0x38]
add esp, 0x20
push 0x1388
push 1
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x34], esp
mov ebp, esp
push eax
call fcn.00401c50
add eax, 0x10
mov dword [ebp], eax
mov ecx, esp
mov dword [esp + 0x3c], esp
push 0x530c18
mov byte [esp + 0x50], 7
call fcn.00403850
mov eax, dword [esp + 0x54]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x44], esp
mov ebp, esp
push eax
mov byte [esp + 0x54], 8
call fcn.00401c50
add eax, 0x10
mov dword [ebp], eax
add esp, 4
mov ecx, edi
mov byte [esp + 0x50], 6
call fcn.004049e0
mov eax, dword [esp + 0x44]
push eax
lea ecx, [esp + 0x1c]
push str.genrsa__out___sinterezenk.opt__2048
push ecx
call fcn.00402f20
mov eax, dword [esp + 0x24]
add esp, 0xc
push 0x1388
push 1
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x3c], esp
mov ebp, esp
push eax
call fcn.00401c50
add eax, 0x10
mov dword [ebp], eax
mov ecx, esp
mov dword [esp + 0x3c], esp
push 0x530c18
mov byte [esp + 0x50], 9
call fcn.00403850
mov eax, dword [esp + 0x54]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x3c], esp
mov ebp, esp
push eax
mov byte [esp + 0x54], 0xa
call fcn.00401c50
add esp, 4
add eax, 0x10
mov dword [ebp], eax
mov ecx, edi
mov byte [esp + 0x50], 6
call fcn.004049e0
mov edx, dword [esp + 0x44]
push edx
lea eax, [esp + 0x24]
push str._sinterezenk.opt
push eax
call fcn.00402f20
mov ebx, dword [esp + 0x2c]
add esp, 0xc
push ebx
mov byte [esp + 0x1b], 1
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x406114
push 0x52fec4
push ebx
call fcn.005060c6
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x4060e3
push 2
push 0
push ebp
call fcn.00505f7d
push ebp
call fcn.00505e85
push ebp
mov dword [esp + 0x3c], eax
call fcn.00505c6c
add esp, 0x14
cmp dword [esp + 0x28], 0
jne 0x406140
push ebx
lea ecx, [esp + 0x20]
push str.openssl_key_file_size2_is_0__s_
push ecx
call fcn.00402f20
mov edx, dword [esp + 0x28]
push edx
push 0xce9
push str.CI3GSvcManagerApp::WorkCerts
call fcn.00403910
add esp, 0x18
push ebx
mov byte [esp + 0x1b], 0
call esi
jmp 0x406140
push ebx
lea eax, [esp + 0x20]
push str.openssl_key_file2_not_exist__s_
push eax
call fcn.00402f20
mov ecx, dword [esp + 0x28]
push ecx
push 0xcf3
push str.CI3GSvcManagerApp::WorkCerts
call fcn.00403910
add esp, 0x18
mov byte [esp + 0x17], 0
mov edx, dword [esp + 0x44]
push str.ik.opt
push edx
lea eax, [esp + 0x2c]
push 0x52fde4
push eax
call fcn.00402f20
mov ebp, dword [esp + 0x34]
add esp, 0x10
cmp byte [esp + 0x17], 0
jne 0x4061b2
push 1
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
jne 0x4061b2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
push ebp
push eax
lea ecx, [esp + 0x28]
push str.rename_failed2__d___s___s_
push ecx
call fcn.00402f20
mov edx, dword [esp + 0x30]
push edx
push 0xd02
push str.CI3GSvcManagerApp::WorkCerts
call fcn.00403910
add esp, 0x20
push 0
push 0
push str.ssl
call fcn.00416878
mov eax, dword [esp + 0x44]
push str.InterezenSSLServer.csr
push eax
push eax
push 0x530b40
push eax
lea eax, [esp + 0x2c]
push str.req__config___s_s___new__key___sinterezenk.opt___out___s_s___subj___emailAddressHJKIM_INTEREZEN.CO.KR_CN127.0.0.1_OUINTEREZEN_OINTEREZEN_LSEOUL_STSEOUL_CKR_
push eax
call fcn.00402f20
mov eax, dword [esp + 0x34]
add esp, 0x1c
push 0x1388
push 1
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x3c], esp
mov ebx, esp
push eax
call fcn.00401c50
add eax, 0x10
mov dword [ebx], eax
mov ecx, esp
mov dword [esp + 0x3c], esp
push 0x530c18
mov byte [esp + 0x50], 0xb
call fcn.00403850
mov eax, dword [esp + 0x54]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x3c], esp
mov ebx, esp
push eax
mov byte [esp + 0x54], 0xc
call fcn.00401c50
add eax, 0x10
mov dword [ebx], eax
add esp, 4
mov ecx, edi
mov byte [esp + 0x50], 6
call fcn.004049e0
mov eax, dword [esp + 0x44]
push str.InterezenSSLServerCert.ext
push eax
push eax
push str.interezen_rootca.key
push eax
push str.interezen_rootca.crt
push eax
push str.InterezenSSLServer.csr
push eax
lea ecx, [esp + 0x3c]
push str.x509__req__in___s_s___CA___s_s___CAkey___s_s___CAcreateserial__out___sinterezen.opt___sha256__extfile___s_s___days_7300
push ecx
call fcn.00402f20
mov eax, dword [esp + 0x44]
add esp, 0x2c
push 0x1388
push 1
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x3c], esp
mov ebx, esp
push eax
call fcn.00401c50
add eax, 0x10
mov dword [ebx], eax
mov ecx, esp
mov dword [esp + 0x3c], esp
push 0x530c18
mov byte [esp + 0x50], 0xd
call fcn.00403850
mov eax, dword [esp + 0x54]
push ecx
mov byte [esp + 0x50], 0xe
mov dword [esp + 0x3c], esp
mov ebx, esp
add eax, 0xfffffff0
push eax
call fcn.00401c50
add eax, 0x10
mov dword [ebx], eax
add esp, 4
mov ecx, edi
mov byte [esp + 0x50], 6
call fcn.004049e0
push str.interezen_rootca.crt
lea edx, [esp + 0x1c]
push str._add__c__s__s__r_localMachine_root
push edx
call fcn.00402f20
mov eax, dword [esp + 0x24]
add esp, 0xc
push 0x1388
push 1
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x3c], esp
mov ebx, esp
push eax
call fcn.00401c50
add eax, 0x10
mov dword [ebx], eax
mov ecx, esp
mov dword [esp + 0x3c], esp
push 0x5307a8
mov byte [esp + 0x50], 0xf
call fcn.00403850
mov eax, dword [esp + 0x54]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x3c], esp
mov ebx, esp
push eax
mov byte [esp + 0x54], 0x10
call fcn.00401c50
add eax, 0x10
mov dword [ebx], eax
add esp, 4
mov ecx, edi
mov byte [esp + 0x50], 6
call fcn.004049e0
mov eax, dword [esp + 0x44]
push str.interezen_rootca.key
push eax
lea ecx, [esp + 0x20]
push 0x52fde4
push ecx
call fcn.00402f20
mov edx, dword [esp + 0x28]
add esp, 0x10
push edx
call esi
mov eax, dword [esp + 0x44]
push str.InterezenSSLServer.csr
push eax
lea ecx, [esp + 0x20]
push 0x52fde4
push ecx
call fcn.00402f20
mov edx, dword [esp + 0x28]
add esp, 0x10
push edx
call esi
mov eax, dword [esp + 0x44]
push str.InterezenSSLServerCert.ext
push eax
lea ecx, [esp + 0x20]
push 0x52fde4
push ecx
call fcn.00402f20
mov edx, dword [esp + 0x28]
add esp, 0x10
push edx
call esi
mov eax, dword [esp + 0x44]
push eax
lea ecx, [esp + 0x1c]
push str._sinterezen_rootca.srl
push ecx
call fcn.00402f20
mov edx, dword [esp + 0x24]
add esp, 0xc
push edx
call esi
mov eax, dword [esp + 0x44]
push 0x530c18
push eax
lea ecx, [esp + 0x20]
push 0x52fde4
push ecx
call fcn.00402f20
mov edx, dword [esp + 0x28]
add esp, 0x10
push edx
call esi
mov eax, dword [esp + 0x44]
push 0x530b40
push eax
lea ecx, [esp + 0x20]
push 0x52fde4
push ecx
call fcn.00402f20
mov edi, dword [esp + 0x28]
add esp, 0x10
push edi
call esi
push ebp
call esi
lea eax, [ebp - 0x10]
mov byte [esp + 0x3c], 5
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x406432
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov byte [esp + 0x3c], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406457
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov byte [esp + 0x3c], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40647c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov byte [esp + 0x3c], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40649d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x44]
add eax, 0xfffffff0
mov dword [esp + 0x3c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4064c5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x34]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret 4