Function at 0x40d980
Capabilities:
Extract resource via kernel32 functions
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x39c
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
push ebx
call dword [sym.imp.USER32.dll_GetMenuItemCount]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 8]
mov esi, eax
or eax, 0xffffffff
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], eax
mov eax, 1
shl eax, cl
xor edi, edi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x10], edi
test dword [edx + 0x30], eax
mov dword [ebp - 8], edi
sete byte [ebp + 0x13]
mov dword [ebp - 4], edi
mov dword [ebp - 0x70], edx
mov dword [ebp - 0x68], 0xffffff01
mov dword [ebp - 0xa0], 0x2c
mov dword [ebp - 0x14], eax
cmp esi, edi
jle 0x40db88
mov edi, edi
push edi
push ebx
call dword [sym.imp.USER32.dll_GetMenuItemID]
lea ecx, [ebp - 0x70]
mov esi, eax
call fcn.0040bc90
cmp byte [ebp + 0x13], 0
mov dword [ebp - 0x9c], 1
mov dword [ebp - 0x94], 0
je 0x40daaf
cmp esi, 0x8023
je 0x40da9f
cmp esi, 0x9c41
je 0x40da59
cmp esi, 0xe110
jne 0x40da3e
mov dword [ebp - 8], esi
mov dword [ebp - 0xc], edi
mov ecx, dword [ebp - 4]
test ecx, ecx
je 0x40dae6
cmp esi, ecx
jne 0x40dae6
mov dword [ebp - 0xc], edi
jmp 0x40dae6
mov dword [ebp - 8], 0x9c41
mov dword [ebp - 4], 0x1310
lea edx, [esi - 0x1770]
cmp edx, 0xa
ja 0x40db35
push 0x400
push edi
push ebx
call dword [sym.imp.USER32.dll_GetMenuState]
test al, 8
je 0x40db7e
push 0x400
push edi
push edi
push edi
push ebx
call dword [sym.imp.USER32.dll_CheckMenuRadioItem]
jmp 0x40db7e
mov dword [ebp - 8], 0x8023
mov dword [ebp - 4], 0x131a
jmp 0x40da67
cmp esi, 0xe110
jl 0x40dac3
cmp esi, 0xe117
jle 0x40db7e
cmp esi, 0x1310
jl 0x40dad7
cmp esi, 0x1318
jl 0x40db7e
lea ecx, [esi - 0x131a]
cmp ecx, 7
jbe 0x40db7e
cmp esi, 0xf060
jne 0x40db26
or dword [ebp - 0x10], 1
cmp dword [ebp + 0x14], 0
je 0x40db7e
mov ecx, dword [ebp + 8]
add ecx, 0xc
push ecx
call dword [sym.imp.USER32.dll_IsRectEmpty]
test eax, eax
jne 0x40db7e
cmp esi, 0xf030
jg 0x40db69
je 0x40db71
sub esi, 0xf000
je 0x40db71
sub esi, 0x10
je 0x40db71
jmp 0x40db7e
cmp esi, 0x20
jne 0x40da67
or dword [ebp - 0x10], 2
jmp 0x40db3d
cmp esi, 0xf000
jge 0x40daf2
test al, 1
je 0x40db4b
mov dword [ebp - 0x94], 3
test al, 4
je 0x40db56
or dword [ebp - 0x94], 8
lea eax, [ebp - 0xa0]
push eax
push 1
push edi
push ebx
call dword [sym.imp.USER32.dll_SetMenuItemInfoW]
jmp 0x40db7e
cmp esi, 0xf120
jne 0x40db7e
push 0x401
push edi
push ebx
call dword [sym.imp.USER32.dll_EnableMenuItem]
inc edi
cmp edi, dword [ebp - 0x20]
jl 0x40d9f0
cmp dword [ebp + 0x14], 0
jne 0x40dbc0
cmp dword [ebp - 0x10], 1
jne 0x40dbc0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x40]
push 0
push 0
push 0x229
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
push 0xffffffffffffffeb
push eax
call dword [sym.imp.USER32.dll_GetWindowLongW]
cmp dword [eax + 0x18], 0
jne 0x40dbc0
mov eax, ebx
call fcn.00401d10
mov eax, dword [ebp - 8]
cmp eax, 0x8023
je 0x40e0da
cmp eax, 0x9c41
je 0x40e0d1
cmp eax, 0xe110
jne 0x40e136
mov edi, dword [sym.imp.USER32.dll_RemoveMenu]
xor esi, esi
lea esp, [esp]
push 0
lea ecx, [esi + 0xe110]
push ecx
push ebx
call edi
inc esi
cmp esi, 8
jl 0x40dbf0
cmp dword [0x425340], 0
je 0x40e034
lea ecx, [ebp + 0x14]
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_C2bString::constructor_void_]
xor eax, eax
push 0x1f4
push eax
lea edx, [ebp - 0x334]
push edx
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0
lea eax, [ebp - 0x338]
push eax
push 0
push 0x29
mov dword [ebp - 0x338], 0x1f4
call dword [sym.imp.USER32.dll_SystemParametersInfoW]
mov eax, dword [ebp - 0x1a0]
cdq
xor eax, edx
sub eax, edx
mov dword [ebp - 0x38], eax
imul eax, eax, 0x19
mov ecx, 0x17
lea esi, [ebp - 0x1a0]
lea edi, [ebp - 0x140]
rep movsd dword es:[edi], dword [esi]
lea ecx, [ebp - 0x140]
push ecx
mov dword [ebp - 0x3c], eax
call dword [sym.imp.GDI32.dll_CreateFontIndirectW]
mov ebx, eax
mov eax, dword [ebp - 0x38]
lea edx, [eax + 1]
push edx
push 1
push eax
push 0
mov dword [ebp - 0x24], ebx
call dword [sym.imp.GDI32.dll_CreateRectRgn]
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
push eax
mov dword [ebp - 0x20], eax
call dword [sym.imp.USER32.dll_GetDC]
mov esi, eax
push ebx
xor edi, edi
push esi
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x50], edi
call dword [sym.imp.GDI32.dll_SelectObject]
test edi, edi
jne 0x40dcd3
mov dword [ebp - 0x50], eax
mov ecx, dword [ebp - 8]
push ecx
push esi
call dword [sym.imp.GDI32.dll_SelectClipRgn]
mov eax, dword [0x425340]
xor ebx, ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp + 0x10], eax
cmp eax, 8
jl 0x40dcfa
mov dword [ebp + 0x10], 8
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x40]
mov edi, dword [sym.imp.USER32.dll_GetWindow]
push 5
push eax
call edi
mov esi, eax
cmp esi, ebx
je 0x40dd4a
mov ebx, dword [sym.imp.Ngs3.dll_public:_void___thiscall_C2bString::constructor_class_C2bString_const__]
push 0xffffffffffffffeb
push esi
call dword [sym.imp.USER32.dll_GetWindowLongW]
add eax, 0x14
push eax
lea ecx, [ebp - 0x10]
call ebx
lea ecx, [ebp - 0x10]
push ecx
lea edx, [ebp - 0x1c]
push edx
call fcn.00412150
lea ecx, [ebp - 0x10]
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_C2bString::destructor_void_]
push 2
push esi
call edi
mov esi, eax
test esi, esi
jne 0x40dd17
mov eax, dword [0x42533c]
mov ecx, dword [eax + 4]
cmp word [ecx], 0
mov esi, dword [ebp + 0x10]
jne 0x40de15
xor ebx, ebx
xor edi, edi
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], 0x1999
cmp esi, ebx
je 0x40ddf9
mov edx, dword [0x425630]
lea eax, [esi + esi*4]
add eax, eax
add eax, eax
push eax
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x30], esi
cmp esi, ebx
jle 0x40ddf9
mov esi, eax
mov eax, dword [ebp + 0x10]
add esi, 8
mov dword [ebp - 4], eax
mov eax, dword [0x42533c]
mov edi, dword [ebx + eax]
lea ecx, [ebx + eax + 4]
push 0x5c
push edi
mov dword [esi + 8], ecx
mov dword [esi - 8], edi
mov dword [esi], 0
mov dword [esi + 4], 0xffffffff
call dword [sym.imp.MSVCRT.dll_wcsrchr]
add esp, 8
test eax, eax
je 0x40dddf
add eax, 2
jmp 0x40dde1
mov eax, edi
sub eax, edi
sar eax, 1
mov dword [esi - 4], eax
add esi, 0x14
add ebx, 0xc
dec dword [ebp - 4]
jne 0x40ddab
mov edi, dword [ebp - 0x34]
mov esi, dword [ebp + 0x10]
lea edx, [ebp - 0x34]
push edx
call fcn.0041ad10
test edi, edi
je 0x40de15
mov eax, dword [0x425630]
push edi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
test esi, esi
jle 0x40dfb6
mov dword [ebp - 4], 0
mov esi, 0xe110
mov ecx, dword [ebp - 4]
add ecx, dword [0x42533c]
push ecx
lea ecx, [ebp + 0x14]
call dword [0x4253b8]
mov ebx, dword [ebp + 0x14]
push 0x5c
push ebx
call dword [sym.imp.MSVCRT.dll_wcschr]
add esp, 8
test eax, eax
je 0x40ded1
sub eax, ebx
sar eax, 1
lea edi, [eax + 1]
cmp edi, 0x20
jae 0x40ded1
push edi
lea eax, [ebp - 0xe0]
push ebx
push eax
call dword [sym.imp.MSVCRT.dll_wcsncpy]
add esp, 0xc
lea edx, [ebp - 0xe0]
xor ecx, ecx
push edx
mov word [ebp + edi*2 - 0xe0], cx
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
dec eax
je 0x40de95
sub eax, 2
je 0x40de95
sub eax, 3
jne 0x40ded1
mov ecx, dword [ebp + 0x14]
lea eax, [ebp - 0x390]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
xor edx, edx
mov dword [ebp - 0x398], eax
test ecx, ecx
sete dl
mov dword [ebp - 0x394], ecx
mov edi, edx
cmp eax, 0xffffffff
je 0x40ded3
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x40ded3
xor edi, edi
cmp byte [0x425800], 0
jne 0x40df15
lea eax, [esi - 0xe110]
cmp eax, 4
jl 0x40df15
push 0x14000
lea ecx, [ebp - 0x44]
push ecx
push 0xffffffffffffffff
push 0xffffffffffffffff
lea ecx, [ebp + 0x14]
call dword [sym.imp.Ngs3.dll_public:_wchar_t____thiscall_C2bString::GetBuffer_int_]
mov edx, dword [ebp - 0x4c]
push eax
push edx
call dword [sym.imp.USER32.dll_DrawTextW]
push 0xffffffffffffffff
lea ecx, [ebp + 0x14]
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_C2bString::ReleaseBuffer_int_]
jmp 0x40df39
lea ecx, [ebp + 0x14]
call dword [sym.imp.Ngs3.dll_public:_unsigned_int___thiscall_C2bString::GetLength_void_const]
cmp eax, 0x2e
jbe 0x40df39
mov eax, dword [0x42533c]
mov ecx, dword [ebp - 4]
lea edx, [ecx + eax + 4]
push edx
lea ecx, [ebp + 0x14]
call dword [0x4253b8]
lea eax, [esi - 0xe10f]
push eax
push 0x42081c
lea ecx, [ebp + 0x14]
push 0xc
push ecx
call dword [sym.imp.Ngs3.dll_public:_class_C2bString_const____cdecl_C2bString::FormatBefore_int__wchar_t_const__]
add esp, 0x10
test edi, edi
je 0x40df66
push str._t___
lea ecx, [ebp + 0x14]
call dword [0x4253c8]
mov edx, dword [ebp + 0x14]
mov eax, dword [0x42533c]
mov edi, dword [ebp - 4]
push edx
lea ecx, [edi + eax]
push esi
lea eax, [ebp - 0x1c]
call fcn.00412250
mov ecx, dword [ebp - 0xc]
neg eax
sbb eax, eax
and eax, 8
or eax, 0x400
push eax
mov eax, dword [ebp + 0xc]
lea edx, [ecx + esi - 0xe110]
push edx
push eax
call dword [sym.imp.USER32.dll_InsertMenuW]
inc esi
add edi, 0xc
lea ecx, [esi - 0xe110]
mov dword [ebp - 4], edi
cmp ecx, dword [ebp + 0x10]
jl 0x40de29
mov edi, dword [ebp - 0x4c]
push 0
push edi
call dword [sym.imp.GDI32.dll_SelectClipRgn]
mov esi, dword [ebp - 0x1c]
test esi, esi
je 0x40dffc
mov edx, dword [esi]
push edx
lea ecx, [ebp - 0x1c]
call fcn.00416750
mov eax, dword [esi + 4]
push eax
lea ecx, [ebp - 0x1c]
call fcn.00416750
lea ecx, [esi + 8]
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_C2bString::destructor_void_]
mov ecx, dword [0x425630]
push esi
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_HeapFree]
dec dword [ebp - 0x18]
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x1c], 0
test eax, eax
je 0x40e012
push eax
push edi
call dword [sym.imp.GDI32.dll_SelectObject]
mov edx, dword [ebp - 0x20]
push edi
push edx
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, dword [ebp - 8]
mov esi, dword [sym.imp.GDI32.dll_DeleteObject]
push eax
call esi
mov ecx, dword [ebp - 0x24]
push ecx
call esi
jmp 0x40e256
movzx ecx, word [0x4257ec]
mov eax, dword [0x4257f4]
push ecx
push 0x80
push 4
push eax
mov esi, eax
call dword [sym.imp.KERNEL32.dll_FindResourceExW]
test eax, eax
je 0x40e066
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
jmp 0x40e068
xor eax, eax
push eax
call dword [sym.imp.USER32.dll_LoadMenuIndirectW]
mov esi, eax
push 0
push esi
call dword [sym.imp.USER32.dll_GetSubMenu]
push 0
push 0x80
lea edx, [ebp - 0x240]
push edx
push 0xe110
push eax
call dword [sym.imp.USER32.dll_GetMenuStringW]
mov ecx, dword [ebp - 0xc]
lea eax, [ebp - 0x240]
push eax
push 0xe110
push 0x402
push ecx
push ebx
call dword [sym.imp.USER32.dll_InsertMenuW]
test esi, esi
je 0x40e25f
push esi
call dword [sym.imp.USER32.dll_DestroyMenu]
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x14]
or dword [eax + 0x30], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov dword [ebp + 0x10], 0x425344
jmp 0x40e0e1
mov dword [ebp + 0x10], 0x425368
lea ecx, [ebp + 0x14]
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_C2bString::constructor_void_]
cmp dword [ebp - 0xc], 0
jle 0x40e117
mov edi, dword [sym.imp.USER32.dll_RemoveMenu]
xor esi, esi
mov eax, dword [ebp - 4]
push 0
lea ecx, [esi + eax]
push ecx
push ebx
call edi
inc esi
cmp esi, 8
jl 0x40e0f8
mov edx, dword [ebp - 0xc]
push 0x400
dec edx
push edx
push ebx
call edi
mov eax, 0x9c41
cmp dword [ebp - 8], eax
jne 0x40e148
lea ecx, [ebp - 0x70]
call fcn.0040bc90
test al, 1
je 0x40e148
lea ecx, [ebp + 0x14]
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_C2bString::destructor_void_]
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp + 8]
or dword [eax + 0x30], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov esi, dword [ebp + 0x10]
cmp dword [esi], 0
je 0x40e160
push 0
push 0
push 0x800
push ebx
call dword [sym.imp.USER32.dll_AppendMenuW]
cmp dword [esi], 0
mov dword [ebp - 0xc], 0
je 0x40e256
mov edi, dword [ebp - 4]
mov ebx, dword [ebp + 0x10]
mov eax, 1
sub eax, edi
mov dword [ebp - 0x24], eax
mov eax, dword [ebx]
mov ecx, dword [eax]
lea edx, [ebp + 0x14]
push edx
push ecx
call dword [sym.imp.Ngs3.dll_ngsGetTypeInfo]
mov edx, dword [ebp + 0x14]
push 0xa
push edx
call dword [sym.imp.MSVCRT.dll_wcsrchr]
add esp, 0x10
test eax, eax
je 0x40e1b3
sub eax, dword [ebp + 0x14]
lea ecx, [ebp + 0x14]
sar eax, 1
push eax
push 0
call dword [sym.imp.Ngs3.dll_public:_class_C2bString_const____thiscall_C2bString::Trim_int__int_]
lea ecx, [ebp + 0x14]
call dword [sym.imp.Ngs3.dll_public:_unsigned_int___thiscall_C2bString::GetLength_void_const]
cmp eax, 3
jbe 0x40e1f6
mov esi, dword [ebp + 0x14]
lea ecx, [ebp + 0x14]
call dword [sym.imp.Ngs3.dll_public:_unsigned_int___thiscall_C2bString::GetLength_void_const]
push 3
lea esi, [esi + eax*2 - 6]
push 0x420834
push esi
call dword [sym.imp.MSVCRT.dll_wcsncmp]
add esp, 0xc
test eax, eax
jne 0x40e1f6
sub esi, dword [ebp + 0x14]
lea ecx, [ebp + 0x14]
sar esi, 1
push esi
push eax
call dword [sym.imp.Ngs3.dll_public:_class_C2bString_const____thiscall_C2bString::Trim_int__int_]
mov eax, dword [ebp - 0x24]
add eax, edi
push eax
push 0x42081c
lea ecx, [ebp + 0x14]
push 0xc
push ecx
call dword [sym.imp.Ngs3.dll_public:_class_C2bString_const____cdecl_C2bString::FormatBefore_int__wchar_t_const__]
add esp, 0x10
cmp dword [ebp - 8], 0x8023
jne 0x40e22d
mov edx, dword [ebx]
mov ebx, dword [edx]
call fcn.004058b0
test eax, eax
je 0x40e22d
mov eax, 8
jmp 0x40e22f
xor eax, eax
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0xc]
push ecx
push edi
push eax
push edx
call dword [sym.imp.USER32.dll_AppendMenuW]
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp + 0x10]
inc eax
lea ebx, [ecx + eax*4]
inc edi
cmp dword [ebx], 0
mov dword [ebp - 0xc], eax
jne 0x40e180
lea ecx, [ebp + 0x14]
call dword [sym.imp.Ngs3.dll_public:_void___thiscall_C2bString::destructor_void_]
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x14]
or dword [eax + 0x30], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10