Function at 0x4160c0
Capabilities:
Access peb ldr_data
Print debug messages

Disassembly:
push 0xffffffffffffffff
push 0x475bba
mov eax, dword fs:[0]
push eax
sub esp, 0x130
mov eax, dword [0x49ef38]
xor eax, esp
mov dword [esp + 0x12c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x49ef38]
xor eax, esp
push eax
lea eax, [esp + 0x144]
mov dword fs:[0], eax
mov ebp, ecx
xor esi, esi
push 0xff
lea eax, [esp + 0x45]
push esi
push eax
mov dword [esp + 0x158], esi
mov byte [esp + 0x44], 0x40
mov byte [esp + 0x45], 0xa0
mov byte [esp + 0x46], 0
mov byte [esp + 0x47], 0
mov byte [esp + 0x48], 0
mov byte [esp + 0x49], 0
mov byte [esp + 0x4c], 0
call sub.MSVCR90.dll_memset
add esp, 0xc
push 0x47dd5c
lea ecx, [esp + 0x20]
call fcn.00406330
mov ecx, dword [esp + 0x154]
push ecx
lea edx, [esp + 0x20]
push str.._s
push edx
mov byte [esp + 0x158], 1
call fcn.00402eb0
mov eax, dword [0x49f4e4]
mov edx, dword [eax + 0xc]
add esp, 0xc
mov ecx, 0x49f4e4
call edx
add eax, 0x10
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x154]
push eax
lea ecx, [esp + 0x30]
push str._sSamsungKiesInstaller.ini
push ecx
mov byte [esp + 0x158], 2
call fcn.00402eb0
mov edi, dword [esp + 0x38]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 0xc
mov edi, edi
push 0
push 0x80
push 3
push 0
push 0
push SysReAllocStringLen
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x416299
call ebx
push eax
push str._open_error____d_
call fcn.004031a0
inc esi
add esp, 8
cmp esi, 3
jl 0x4161b0
push str._file_not_exist
call fcn.004031a0
add edi, 0xfffffff0
add esp, 4
mov byte [esp + 0x14c], 1
lea edx, [edi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x416219
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [esp + 0x14c], 0
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x416241
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x154]
add eax, 0xfffffff0
mov dword [esp + 0x14c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41626f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x144]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x12c]
xor ecx, esp
call fcn.00471f66
add esp, 0x13c
ret 4
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
add edi, 0xfffffff0
mov dword [esp + 0x24], esp
mov esi, esp
push edi
mov dword [esp + 0x30], edi
call fcn.00401530
add esp, 4
lea ecx, [esp + 0x1c]
add eax, 0x10
push ecx
mov ecx, ebp
mov dword [esi], eax
call fcn.00412f40
mov edx, dword [0x49f4e4]
mov eax, dword [edx + 0xc]
mov ecx, 0x49f4e4
mov byte [esp + 0x14c], 3
call eax
add eax, 0x10
mov dword [esp + 0x30], eax
mov ecx, dword [esp + 0x154]
push ecx
lea edx, [esp + 0x34]
push 0x480b78
push edx
mov byte [esp + 0x158], 4
call fcn.00402eb0
mov edi, dword [esp + 0x3c]
add esp, 8
lea ebx, [edi - 0x10]
mov dword [esp + 0x24], esp
mov esi, esp
push ebx
call fcn.00401530
add eax, 0x10
mov dword [esi], eax
add esp, 4
lea eax, [esp + 0x18]
push eax
mov ecx, ebp
call fcn.004132e0
mov edx, dword [0x49f4e4]
mov eax, dword [edx + 0xc]
mov ecx, 0x49f4e4
mov byte [esp + 0x14c], 5
call eax
add eax, 0x10
mov dword [esp + 0x24], eax
mov ecx, dword [esp + 0x14]
push ecx
lea edx, [esp + 0x28]
push str._s
push edx
mov byte [esp + 0x158], 6
call fcn.00402eb0
mov eax, dword [esp + 0x30]
mov ebp, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
add esp, 0xc
push eax
call ebp
push edi
lea ecx, [esp + 0x28]
push str._s
push ecx
call fcn.00402eb0
mov edi, dword [esp + 0x30]
add esp, 0xc
push edi
call ebp
mov edx, dword [esp + 0x14]
mov esi, dword [edx - 0xc]
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
sub eax, esi
or eax, ecx
jge 0x4163bb
push esi
lea ecx, [esp + 0x18]
call fcn.00401eb0
mov edx, dword [esp + 0x14]
lea eax, [esi + 1]
push eax
push edx
call dword [sym.imp.MSVCR90.dll__wcslwr_s]
add esp, 8
test esi, esi
jl 0x4165e1
mov eax, dword [esp + 0x14]
cmp esi, dword [eax - 8]
jg 0x4165e1
mov dword [eax - 0xc], esi
mov edx, dword [esp + 0x14]
xor ecx, ecx
mov word [edx + esi*2], cx
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov esi, dword [edx - 0xc]
mov dword [esp + 0x20], eax
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
sub eax, esi
or eax, ecx
jge 0x416419
push esi
lea ecx, [esp + 0x1c]
call fcn.00401eb0
mov edx, dword [esp + 0x18]
lea ecx, [esi + 1]
push ecx
push edx
call dword [sym.imp.MSVCR90.dll__wcslwr_s]
add esp, 8
test esi, esi
jl 0x4165e1
mov eax, dword [esp + 0x18]
cmp esi, dword [eax - 8]
jg 0x4165e1
mov ecx, dword [esp + 0x20]
mov dword [eax - 0xc], esi
mov eax, dword [esp + 0x18]
xor edx, edx
mov word [eax + esi*2], dx
test ecx, ecx
je 0x416475
mov eax, dword [esp + 0x18]
cmp dword [eax - 0xc], edx
jl 0x416475
push ecx
push eax
call dword [sym.imp.MSVCR90.dll_wcsstr]
add esp, 8
test eax, eax
je 0x416475
sub eax, dword [esp + 0x18]
sar eax, 1
je 0x416531
lea eax, [edi - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [esp + 0x14c], 5
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x416499
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x14c], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4164c1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x14c], 3
lea ecx, [ebx + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4164e2
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
call edx
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x14c], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41650a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x28]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [esp + 0x14c], 1
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x416219
mov ecx, dword [eax]
push eax
jmp 0x416212
mov ecx, dword [esp + 0x1c]
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocStringLen
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x41657a
add edi, 0xfffffff0
mov byte [esp + 0x14c], 5
lea edx, [edi + 0xc]
or eax, eax
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x416499
mov ecx, dword [edi]
push edi
jmp 0x416492
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
push str.SendCtrlCommandToCDrom1
call ebp
push str.SendCtrlCommandToCDrom2
call ebp
push 0
lea ecx, [esp + 0x38]
push ecx
push 0x100
lea edx, [esp + 0x4c]
push edx
push 6
lea eax, [esp + 0x4c]
push eax
push 0x2d4808
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x4165ce
push str.SendCtrlCommandToCDrom_Success
call ebp
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x416475
push str.SendCtrlCommandToCDrom_Fail
call ebp
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x416475
push 0x80070057
call fcn.00401120
int3