Function at 0x403ac0
Capabilities:
Accept command line arguments
Hide graphical window
Resolve function by parsing pe exports
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xa4
mov eax, dword [0x46f08c]
xor eax, esp
mov dword [esp + 0xa0], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
lea eax, [esp + 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
cmp dword [esp + 0x60], 1
mov ebx, eax
jle 0x403da5
call fcn.00403870
mov esi, 1
mov dword [esp + 0x64], 0
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], 7
mov dword [esp + 0x14], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 7
mov dword [esp + 0x7c], 0
mov dword [esp + 0x8c], 0
mov dword [esp + 0x90], 7
mov dword [esp + 0x94], 0
mov dword [esp + 0xa4], 0
mov dword [esp + 0xa8], 7
cmp dword [esp + 0x60], esi
jle 0x403cc8
push str._help
push dword [ebx + esi*4]
call fcn.00436108
add esp, 8
test eax, eax
je 0x403d81
push 0x4659e8
push dword [ebx + esi*4]
call fcn.00436108
add esp, 8
test eax, eax
je 0x403d81
push str._load
push dword [ebx + esi*4]
lea edi, [esi + 1]
call fcn.00436108
add esp, 8
test eax, eax
jne 0x403bf9
cmp edi, dword [esp + 0x60]
jge 0x403bf9
mov esi, edi
mov edx, dword [ebx + esi*4]
mov ecx, edx
lea edi, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x403be0
sub ecx, edi
sar ecx, 1
push ecx
lea ecx, [esp + 0x68]
jmp 0x403cb7
push str._save
push dword [ebx + esi*4]
call fcn.00436108
add esp, 8
test eax, eax
jne 0x403c39
cmp edi, dword [esp + 0x60]
jge 0x403c39
mov esi, edi
mov edx, dword [ebx + esi*4]
mov ecx, edx
lea edi, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x403c20
sub ecx, edi
sar ecx, 1
push ecx
lea ecx, [esp + 0x18]
jmp 0x403cb7
push str._import
push dword [ebx + esi*4]
call fcn.00436108
add esp, 8
test eax, eax
jne 0x403c79
cmp edi, dword [esp + 0x60]
jge 0x403c79
mov esi, edi
mov edx, dword [ebx + esi*4]
mov ecx, edx
lea edi, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x403c60
sub ecx, edi
sar ecx, 1
push ecx
lea ecx, [esp + 0x80]
jmp 0x403cb7
push str._export
push dword [ebx + esi*4]
call fcn.00436108
add esp, 8
test eax, eax
jne 0x403cbd
cmp edi, dword [esp + 0x60]
jge 0x403cbd
mov esi, edi
mov edx, dword [ebx + esi*4]
mov eax, edx
lea edi, [eax + 2]
nop dword [eax]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x403ca0
sub eax, edi
lea ecx, [esp + 0x94]
sar eax, 1
push eax
push edx
call fcn.0040b560
inc esi
cmp esi, dword [esp + 0x60]
jl 0x403b82
lea ecx, [esp + 0x64]
call fcn.00408d20
test al, al
jne 0x403cf6
push ecx
mov edx, str.Loading_DEF_file:
call fcn.0040fd20
push ecx
lea edx, [esp + 0x6c]
mov ecx, eax
call fcn.00410030
add esp, 4
mov ecx, eax
call fcn.00407a40
lea ecx, [esp + 0x7c]
call fcn.00408d20
test al, al
jne 0x403d27
push ecx
mov edx, str.Importing_palette_from_JSON:
call fcn.0040fd20
push ecx
lea edx, [esp + 0x84]
mov ecx, eax
call fcn.00410030
add esp, 4
mov ecx, eax
call fcn.00407a40
lea ecx, [esp + 0x94]
call fcn.00408d20
test al, al
jne 0x403d5b
push ecx
mov edx, str.Exporting_palette_to_JSON:
call fcn.0040fd20
push ecx
lea edx, [esp + 0x9c]
mov ecx, eax
call fcn.00410030
add esp, 4
mov ecx, eax
call fcn.00407a40
lea ecx, [esp + 0x14]
call fcn.00408d20
test al, al
jne 0x403d98
push ecx
mov edx, str.Saving_DEF_file:
call fcn.0040fd20
push ecx
lea edx, [esp + 0x1c]
mov ecx, eax
call fcn.00410030
jmp 0x403d8e
sub esp, 8
mov edx, str._nUsage:_DEFRecolor__options__nOptions:_n___load__file.def________Load_a_DEF_file._n___save__file.def________Save_the_current_DEF_to_a_file._n___import__file.json_____Import_a_palette_from_a_JSON_file._n___export__file.json_____Export_the_current_palette_to_a_JSON_file._n___help_or_______________Show_this_help_message._nExamples:_n__DEFRecolor__load_myfile.def__import_palette.json__save_newfile.def_n__DEFRecolor__load_myfile.def__export_palette.json_n
call fcn.0040fd20
add esp, 4
mov ecx, eax
call fcn.00407a40
call fcn.00403a00
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov esi, dword [sym.imp.USER32.dll_LoadStringW]
push 0x64
push 0x471f30
push 0x67
push edi
call esi
push 0x64
push 0x471e60
push 0x6d
push edi
call esi
mov esi, dword [sym.imp.USER32.dll_LoadIconW]
push 0x6b
push edi
mov dword [esp + 0x1c], 0x30
mov dword [esp + 0x20], 3
mov dword [esp + 0x24], 0x4057c0
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0
mov dword [esp + 0x30], edi
call esi
push 0x7f00
push 0
mov dword [esp + 0x34], eax
call dword [sym.imp.USER32.dll_LoadCursorW]
push 0x6c
push dword [esp + 0x2c]
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], 6
mov dword [esp + 0x40], 0x6d
mov dword [esp + 0x44], 0x471e60
call esi
mov dword [esp + 0x40], eax
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.USER32.dll_RegisterClassExW]
lea eax, [esp + 0x64]
mov dword [0x471e5c], edi
push eax
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
mov eax, dword [esp + 0x6c]
add eax, 0xfffffd12
cdq
push 0
sub eax, edx
mov esi, eax
mov eax, dword [esp + 0x74]
push edi
push 0
push 0
lea eax, [eax - 0x1c2]
sar esi, 1
push 0x1c2
cdq
push 0x2ee
sub eax, edx
sar eax, 1
push eax
push esi
push 0xcf0000
push 0x471f30
push 0x471e60
push 0
call dword [sym.imp.USER32.dll_CreateWindowExW]
mov esi, eax
test esi, esi
jne 0x403ec3
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xa0]
xor ecx, esp
call fcn.00431ae7
mov esp, ebp
pop ebp
ret 0x10
push dword [ebp + 0x14]
push esi
call dword [sym.imp.USER32.dll_ShowWindow]
push esi
call dword [sym.imp.USER32.dll_UpdateWindow]
push 0x6d
push edi
call dword [sym.imp.USER32.dll_LoadAcceleratorsW]
mov esi, dword [sym.imp.USER32.dll_GetMessageW]
push 0
push 0
mov dword [esp + 0x18], eax
lea eax, [esp + 0x4c]
push 0
push eax
call esi
test eax, eax
je 0x403f3a
mov edi, dword [sym.imp.USER32.dll_TranslateMessage]
mov ebx, dword [sym.imp.USER32.dll_DispatchMessageW]
lea eax, [esp + 0x44]
push eax
push dword [esp + 0x14]
push dword [esp + 0x4c]
call dword [sym.imp.USER32.dll_TranslateAcceleratorW]
test eax, eax
jne 0x403f29
lea eax, [esp + 0x44]
push eax
call edi
lea eax, [esp + 0x44]
push eax
call ebx
push 0
push 0
push 0
lea eax, [esp + 0x50]
push eax
call esi
test eax, eax
jne 0x403f04
mov ecx, dword [esp + 0xac]
mov eax, dword [esp + 0x4c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00431ae7
mov esp, ebp
pop ebp
ret 0x10