Function at 0x405840
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x42950d
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xf8
mov eax, dword [0x43598c]
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov dword [esp + 0x14], eax
xor ebp, ebp
mov dword [esp + 0x10], eax
mov dword [esp + 0x110], ebp
mov dword [esp + 0x28], ebp
mov ebx, 1
push 0x69
lea ecx, [esp + 0x14]
mov byte [esp + 0x114], bl
call fcn.004215fb
mov esi, dword [edi + 0x60]
mov eax, dword [edi + 0x64]
cmp esi, eax
je 0x405af0
mov ecx, dword [esp + 0x118]
cmp cl, byte [esi]
je 0x4058ba
add esi, 0x15ac
cmp esi, eax
jne 0x4058a7
jmp 0x405af0
cmp dword [esi + 0x150], ebp
je 0x40590e
push 0x84
lea ecx, [esp + 0x18]
call fcn.004215fb
push ebp
push ecx
lea eax, [esp + 0x1c]
mov ecx, esp
mov dword [esp + 0x28], esp
push eax
call fcn.00420f14
push ecx
lea edx, [esp + 0x1c]
mov ecx, esp
mov dword [esp + 0x24], esp
push edx
mov byte [esp + 0x120], 2
call fcn.00420f14
mov ecx, edi
mov byte [esp + 0x11c], bl
call fcn.00405b30
jmp 0x405af0
lea eax, [esp + 0x28]
push eax
push ecx
call sub.Tcsy_KCore_JN_BANK_LCD_K.dll_bsc_IsDefaultPin
add esp, 8
test eax, eax
jne 0x405af0
cmp dword [esp + 0x28], ebx
jne 0x40596e
push 0x7d
lea ecx, [esp + 0x18]
call fcn.004215fb
push ebp
push ecx
lea edx, [esp + 0x1c]
mov ecx, esp
mov dword [esp + 0x28], esp
push edx
call fcn.00420f14
push ecx
lea eax, [esp + 0x1c]
mov ecx, esp
mov dword [esp + 0x28], esp
push eax
mov byte [esp + 0x120], 3
call fcn.00420f14
mov ecx, edi
mov byte [esp + 0x11c], bl
call fcn.00405b30
mov edi, dword [sym.imp.USER32.dll_MessageBoxA]
lea ebp, [esi + 0xb70]
mov dword [esp + 0x20], 2
mov eax, dword [ebp - 0xa1c]
test eax, eax
je 0x405adb
mov ecx, ebp
mov edx, dword [ecx]
mov dword [esp + 0x3c], edx
mov eax, dword [ecx + 4]
mov dword [esp + 0x40], eax
mov edx, dword [ecx + 8]
mov dword [esp + 0x44], edx
mov eax, dword [ecx + 0xc]
lea ecx, [esp + 0x5c]
push ecx
mov dword [esp + 0x4c], eax
call dword [sym.imp.KERNEL32.dll_GetTimeZoneInformation]
xor edx, edx
lea eax, [esp + 0x2c]
mov dword [esp + 0x2c], edx
lea ecx, [esp + 0x3c]
mov dword [esp + 0x30], edx
push eax
mov dword [esp + 0x38], edx
push ecx
mov dword [esp + 0x40], edx
lea edx, [esp + 0x64]
push edx
call dword [sym.imp.KERNEL32.dll_SystemTimeToTzSpecificLocalTime]
lea eax, [esp + 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x30]
sub esp, 0x10
mov ecx, esp
sub esp, 0x10
mov dword [ecx], edx
mov edx, dword [esp + 0x54]
mov dword [ecx + 4], eax
mov eax, dword [esp + 0x58]
mov dword [ecx + 8], edx
mov edx, dword [esp + 0x6c]
mov dword [ecx + 0xc], eax
mov eax, dword [esp + 0x70]
mov ecx, esp
mov dword [ecx], edx
mov edx, dword [esp + 0x74]
mov dword [ecx + 4], eax
mov eax, dword [esp + 0x78]
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], eax
call fcn.00405790
mov esi, eax
add esp, 0x20
test esi, esi
jg 0x405a72
mov ecx, dword [0x43598c]
mov dword [esp + 0x18], ecx
push 0x7e
lea ecx, [esp + 0x1c]
mov byte [esp + 0x114], 4
call fcn.004215fb
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
push 0x10
push edx
push eax
push 0
call edi
mov byte [esp + 0x110], bl
lea ecx, [esp + 0x18]
jmp 0x405ad6
cmp esi, 0x3c
jg 0x405adb
mov eax, dword [0x43598c]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x24], eax
push 0x7f
lea ecx, [esp + 0x28]
mov byte [esp + 0x114], 6
call fcn.004215fb
mov ecx, dword [esp + 0x24]
push esi
lea edx, [esp + 0x20]
push ecx
push edx
call fcn.0041c74d
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x28]
add esp, 0xc
push 0x30
push eax
push ecx
push 0
call edi
lea ecx, [esp + 0x24]
mov byte [esp + 0x110], 5
call fcn.0042119f
mov byte [esp + 0x110], bl
lea ecx, [esp + 0x1c]
call fcn.0042119f
mov eax, dword [esp + 0x20]
add ebp, 0xa2c
dec eax
mov dword [esp + 0x20], eax
jne 0x405982
lea ecx, [esp + 0x10]
mov byte [esp + 0x110], 0
call fcn.0042119f
lea ecx, [esp + 0x14]
mov dword [esp + 0x110], 0xffffffff
call fcn.0042119f
mov ecx, dword [esp + 0x108]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x104
ret 4