Function at 0x402ad0
Capabilities:
Delete file

Disassembly:
sub esp, 0x50
lea eax, [esp + 8]
push esi
xor esi, esi
push eax
push 0x378
mov dword [esp + 0x14], esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x18], esi
mov dword [esp + 0xc], esi
call fcn.0041ccc0
add esp, 8
test eax, eax
je 0x403901
mov ecx, dword [esp + 0xc]
push ebx
push ebp
push edi
push ecx
call fcn.00403b20
mov edx, dword [esp + 0x1c]
push edx
call fcn.00402600
mov dword [esp + 0x44], eax
mov eax, dword [0x451574]
add esp, 8
lea ecx, [eax + 0x168]
call dword [sym.imp.MMFS2.dll_Ordinal_255]
mov eax, 0xfc
or edi, 0xffffffff
mov ecx, dword [0x451574]
add eax, 4
cmp eax, 0x10c
mov dword [eax + ecx - 4], edi
jl 0x402b3f
mov edx, dword [0x451574]
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0x20], esi
mov dword [edx + 0x1f0], edi
mov eax, dword [0x451574]
mov dword [eax + 0x1a8], ecx
mov eax, dword [esp + 0x70]
cmp eax, esi
je 0x402bf4
mov edx, dword [eax + 0x10]
mov eax, dword [0x451574]
mov dword [eax + 0x1b0], edx
mov eax, dword [0x451574]
mov ecx, dword [eax + 0x1b0]
shr ecx, 1
and ecx, 1
mov dword [eax + 0x244], ecx
mov eax, dword [0x451574]
mov edx, dword [eax + 0x1b0]
shr edx, 2
and edx, 1
mov dword [eax + 0x248], edx
mov eax, dword [0x451574]
mov ecx, dword [eax + 0x1b0]
and ecx, 1
mov dword [eax + 0x24c], ecx
mov eax, dword [0x451574]
mov edx, dword [eax + 0x1b0]
and edx, 1
mov dword [eax + 0x250], edx
mov eax, dword [0x451574]
mov ecx, dword [eax + 0x1b0]
shr ecx, 0x13
and ecx, 1
mov dword [eax + 0x240], ecx
mov edx, dword [0x451574]
mov ebx, dword [esp + 0x64]
xor ebp, ebp
cmp ebx, esi
mov dword [edx + 0x9c], edi
jne 0x402c26
mov ebx, dword [0x45158c]
mov ebp, dword [0x450ff4]
cmp ebx, esi
je 0x403908
cmp ebp, esi
je 0x403908
push esi
mov esi, dword [sym.imp.MMFS2.dll_Ordinal_424]
push ebx
call esi
mov ecx, dword [0x451574]
mov dword [ecx + 0x9c], eax
mov edx, dword [0x451574]
cmp dword [edx + 0x9c], edi
je 0x403910
test ebp, ebp
je 0x402ce9
mov eax, dword [esp + 0x6c]
test eax, eax
jne 0x402cd6
mov eax, dword [0x4513c4]
test eax, eax
jne 0x402cd6
push 0x16e260
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov dword [0x4513c4], eax
push 0x104
push eax
mov eax, dword [0x451540]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov ecx, dword [0x4513c4]
push 0
push ecx
call esi
mov esi, eax
cmp esi, 0xffffffff
je 0x402cd6
push 0x100
push esi
call dword [sym.imp.MMFS2.dll_Ordinal_430]
mov edx, dword [0x4513c4]
push 0x16e260
push edx
push esi
call dword [sym.imp.MMFS2.dll_Ordinal_425]
push esi
mov edi, eax
call dword [sym.imp.MMFS2.dll_Ordinal_419]
test edi, edi
je 0x402cd6
cmp edi, 0x40000002
jne 0x403014
mov eax, dword [0x451574]
push ebp
mov ecx, dword [eax + 0x9c]
push ecx
call dword [sym.imp.MMFS2.dll_Ordinal_430]
mov edx, dword [0x451574]
push 0x10
mov dword [edx + 0x84], ebx
mov eax, dword [0x451574]
xor ebx, ebx
mov dword [eax + 0xa0], ebp
mov ecx, dword [0x451574]
mov dword [ecx + 0x360], ebx
mov eax, dword [0x451574]
push eax
mov edx, dword [eax + 0x9c]
push edx
call dword [sym.imp.MMFS2.dll_Ordinal_425]
mov edi, eax
cmp edi, ebx
jne 0x403014
mov eax, dword [0x451574]
cmp dword [eax], 0x454d4150
jne 0x40391a
cmp word [eax + 4], 0x302
jne case.0x402de2.8758
mov esi, dword [esp + 0x6c]
cmp esi, ebx
jne 0x402d5c
cmp dword [eax + 8], 3
jne case.0x402de2.8758
call fcn.00431220
mov edi, eax
cmp edi, ebx
jne 0x403014
mov ebp, dword [sym.imp.MMFS2.dll_Ordinal_423]
mov word [esp + 0x40], bx
mov ecx, dword [0x451574]
lea eax, [esp + 0x40]
push 8
push eax
mov edx, dword [ecx + 0x9c]
push edx
call dword [sym.imp.MMFS2.dll_Ordinal_425]
mov edi, eax
cmp edi, ebx
jne 0x403014
cmp dword [esp + 0x44], ebx
je 0x4031c0
mov eax, dword [0x451574]
mov ecx, dword [eax + 0x9c]
push ecx
call ebp
add eax, dword [esp + 0x44]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x40]
and eax, 0xffff
cmp eax, 0x3333
jg 0x4036a0
je 0x4034ad
sub eax, 0x2223
cmp eax, 0x1f
ja case.0x402de2.8741
jmp dword [eax*4 + 0x403940]
mov eax, dword [0x451574]
push ebx
lea edx, [eax + 0x360]
lea ecx, [eax + 0x10]
mov eax, dword [eax + 0x9c]
push edx
push 0x70
lea edx, [esp + 0x4c]
push ecx
push edx
push eax
call fcn.00416120
add esp, 0x18
mov edi, eax
mov eax, dword [0x451574]
cmp esi, ebx
jne 0x402e2a
test byte [eax + 0x17], 2
je 0x402e2a
mov word [0x451524], 1
mov edx, dword [eax + 0x74]
lea ecx, [eax + 0xd0]
shl edx, 2
push ecx
push edx
call fcn.0041ccc0
add esp, 8
test eax, eax
je 0x4036f0
mov eax, dword [0x451574]
test byte [eax + 0x16], 4
jne 0x402e69
mov edx, dword [eax + 0x74]
lea ecx, [eax + 0xd4]
shl edx, 2
push ecx
push edx
call fcn.0041ccc0
add esp, 8
cmp esi, ebx
jne 0x4036e3
mov eax, dword [0x4513a4]
cmp eax, ebx
je 0x4036e3
mov ecx, dword [0x451574]
test byte [ecx + 0x17], 8
jne 0x4036e3
push 1
call eax
jmp 0x4036e3
mov eax, dword [0x451574]
push ebx
push ebx
lea ecx, [esp + 0x48]
lea edx, [eax + 0x80]
push edx
mov edx, dword [eax + 0x9c]
push ecx
push edx
call fcn.004161b0
add esp, 0x14
jmp 0x4036e1
mov eax, dword [0x451574]
lea ecx, [eax + 0x8c]
jmp 0x4030aa
mov eax, dword [0x451574]
mov ecx, dword [eax + 0x26c]
lea edx, [eax + 0x90]
push ecx
push ebx
push edx
mov edx, dword [eax + 0x9c]
lea ecx, [esp + 0x4c]
push ecx
push edx
call fcn.004161b0
add esp, 0x14
jmp 0x4036e1
mov eax, dword [0x451574]
mov dword [esp + 0x28], 1
lea ecx, [eax + 0x88]
jmp 0x4030aa
cmp dword [esp + 0x28], ebx
jne 0x402f37
mov ecx, dword [0x451574]
mov edx, dword [ecx + 0x9c]
push edx
call ebp
sub eax, 8
mov dword [esp + 0x10], 1
mov dword [esp + 0x1c], eax
mov eax, dword [0x451574]
lea ecx, [eax + 0x94]
jmp 0x4030aa
mov eax, dword [0x451574]
mov ecx, dword [eax + 0x26c]
lea edx, [eax + 0xa4]
push ecx
push ebx
push edx
mov edx, dword [eax + 0x9c]
lea ecx, [esp + 0x4c]
push ecx
push edx
call fcn.004161b0
add esp, 0x14
jmp 0x4036e1
cmp esi, ebx
je case.0x402de2.8741
mov eax, dword [esp + 0x74]
test eax, eax
jns case.0x402de2.8741
mov eax, dword [0x451574]
push ebx
push ebx
lea edx, [esp + 0x48]
lea ecx, [eax + 0xa8]
mov eax, dword [eax + 0x9c]
push ecx
push edx
push eax
call fcn.004161b0
mov edi, eax
add esp, 0x14
cmp edi, ebx
jne 0x403014
mov ecx, dword [0x451574]
mov edx, dword [ecx + 0xa8]
push edx
call fcn.00402a00
mov ecx, dword [0x451574]
add esp, 4
mov dword [ecx + 0xac], eax
jmp 0x4031a8
mov edx, dword [0x451574]
mov dword [edx + 0x260], ebx
mov eax, dword [0x451574]
lea edx, [eax + 0x260]
mov ecx, dword [eax + 0x26c]
push ecx
push ebx
push edx
mov edx, dword [eax + 0x9c]
lea ecx, [esp + 0x4c]
push ecx
push edx
call fcn.004161b0
mov edi, eax
add esp, 0x14
cmp edi, ebx
je 0x4031a8
xor ebx, ebx
cmp dword [esp + 0x14], ebx
je 0x403029
lea ecx, [esp + 0x14]
push ecx
call fcn.0041cd50
add esp, 4
cmp edi, ebx
je 0x40392c
jle 0x40304e
test byte [0x451526], 1
je 0x40304e
mov edx, dword [0x451550]
push 0x40
push edi
push edx
call fcn.0042ec40
add esp, 0xc
mov eax, dword [esp + 0x18]
push eax
call fcn.00403bd0
mov ecx, dword [esp + 0x40]
push ecx
call fcn.00402600
add esp, 8
xor eax, eax
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x50
ret
mov eax, dword [0x451574]
mov dword [eax + 0x274], ebx
mov eax, dword [0x451574]
lea edx, [eax + 0x274]
jmp 0x402fed
cmp esi, ebx
jne case.0x402de2.8741
mov eax, dword [0x451574]
lea ecx, [eax + 0xc0]
jmp 0x4030aa
mov eax, dword [0x451574]
lea ecx, [eax + 0xbc]
mov eax, dword [eax + 0x9c]
push ebx
push ebx
lea edx, [esp + 0x48]
push ecx
push edx
push eax
call fcn.004161b0
add esp, 0x14
jmp 0x4036e1
cmp dword [0x45150c], ebx
jne case.0x402de2.8741
mov edx, dword [0x451574]
push ebx
push ebx
lea ecx, [esp + 0x48]
mov eax, dword [edx + 0x9c]
push 0x45150c
push ecx
push eax
call fcn.004161b0
add esp, 0x14
jmp 0x4036e1
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x10], ebx
cmp eax, ebx
je case.0x402de2.8741
mov ecx, dword [0x451574]
mov edx, dword [ecx + 0x9c]
push edx
call ebp
mov edx, dword [esp + 0x1c]
mov esi, eax
mov eax, 0xfffffff8
sub eax, edx
lea edx, [esp + 0x70]
add esi, eax
mov eax, dword [0x451574]
mov ecx, dword [eax + 0x26c]
push ecx
push 0
push 4
push edx
mov edx, dword [eax + 0x9c]
lea ecx, [esp + 0x50]
push ecx
push edx
call fcn.00416120
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x403014
mov bl, byte [esp + 0x70]
mov ecx, dword [0x451574]
mov eax, dword [esp + 0x1c]
xor bl, 0xd
mov byte [esp + 0x70], bl
mov edx, dword [ecx + 0x9c]
push eax
push edx
call dword [sym.imp.MMFS2.dll_Ordinal_430]
mov eax, dword [0x451574]
push edi
push esi
mov ecx, dword [eax + 0x9c]
push ecx
call fcn.00416340
mov ecx, dword [esp + 0x7c]
add esp, 0xc
cmp eax, ecx
je case.0x402de2.8741
mov dword [esp + 0x10], 1
mov esi, dword [esp + 0x6c]
xor ebx, ebx
mov edx, dword [0x451574]
mov ecx, dword [esp + 0x38]
push ecx
mov eax, dword [edx + 0x9c]
push eax
call dword [sym.imp.MMFS2.dll_Ordinal_430]
cmp word [esp + 0x40], 0x7f7f
jne 0x402d76
jmp 0x403704
lea edx, [esp + 0x40]
push ebx
push edx
call fcn.00414cd0
add esp, 8
jmp 0x4036e1
lea eax, [esp + 0x40]
push 1
push eax
call fcn.00414cd0
add esp, 8
jmp 0x4036e1
lea ecx, [esp + 0x40]
push ecx
call fcn.00421ba0
jmp 0x4036de
mov eax, dword [0x451574]
test byte [eax + 0x1a], 8
je 0x403247
mov ecx, dword [eax + 0x1b0]
test ch, 0x40
jne 0x403247
mov dword [eax + 0x250], ebx
mov edx, dword [0x451574]
mov dword [edx + 0x24c], ebx
mov eax, dword [0x451574]
mov dword [eax + 0x248], ebx
mov ecx, dword [0x451574]
mov dword [ecx + 0x244], ebx
call fcn.00423810
jmp 0x4036e1
cmp dword [0x4513c8], ebx
je case.0x402de2.8741
call fcn.00402500
call fcn.00404f30
jmp 0x4031a8
mov eax, dword [0x451574]
mov edx, dword [eax + 0x26c]
lea ecx, [eax + 0xcc]
mov eax, dword [eax + 0x9c]
push edx
push ebx
lea edx, [esp + 0x48]
push ecx
push edx
push eax
call fcn.004161b0
mov ecx, dword [0x451574]
mov edi, eax
mov edx, dword [ecx + 0xcc]
push edx
call sub.MSVCRT.dll__msize
mov ecx, dword [0x451574]
add esp, 0x18
shr eax, 1
and eax, 0xffff
mov dword [ecx + 0xc8], eax
jmp 0x4036e3
mov eax, dword [0x451574]
lea edx, [esp + 0x64]
push 4
push edx
mov ecx, dword [eax + 0x9c]
push ecx
call dword [sym.imp.MMFS2.dll_Ordinal_425]
mov edi, eax
cmp edi, ebx
jne 0x403014
cmp dword [esp + 0x64], ebx
je case.0x402de2.8741
mov eax, dword [0x451574]
mov cx, word [eax + 0x1a]
mov dword [esp + 0x30], ecx
and ecx, 0xffbf
mov word [eax + 0x1a], cx
mov eax, dword [esp + 0x64]
cmp eax, ebx
jle 0x40346b
mov eax, dword [0x451574]
lea edx, [esp + 0x2c]
push 2
push edx
mov ecx, dword [eax + 0x9c]
push ecx
call dword [sym.imp.MMFS2.dll_Ordinal_425]
mov edi, eax
test edi, edi
jne 0x40346b
push 0x114
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
add esp, 4
test esi, esi
je 0x403410
lea ebp, [esi + 0x108]
xor eax, eax
mov byte [esi], 0
mov dword [esi + 0x104], eax
mov dword [esi + 0x10c], eax
mov dword [ebp], eax
mov dword [esi + 0x110], eax
mov edx, dword [esp + 0x2c]
mov eax, dword [0x451574]
and edx, 0xffff
push edx
push esi
mov ecx, dword [eax + 0x9c]
push ecx
call dword [sym.imp.MMFS2.dll_Ordinal_425]
mov edx, dword [esp + 0x2c]
push esi
and edx, 0xffff
push 0
mov edi, eax
mov byte [edx + esi], 0
call fcn.00416510
test edi, edi
jne 0x403417
mov eax, dword [0x451574]
push 4
push ebp
mov ecx, dword [eax + 0x9c]
push ecx
call dword [sym.imp.MMFS2.dll_Ordinal_425]
mov edi, eax
test edi, edi
jne 0x403433
mov edx, dword [0x451574]
mov eax, dword [edx + 0x9c]
push eax
call dword [sym.imp.MMFS2.dll_Ordinal_423]
mov dword [esi + 0x10c], eax
mov ecx, dword [0x451574]
push esi
add ecx, 0x168
call dword [sym.imp.MMFS2.dll_Ordinal_333]
mov eax, dword [0x451574]
mov edx, dword [ebp]
push edx
mov ecx, dword [eax + 0x9c]
push ecx
call dword [sym.imp.MMFS2.dll_Ordinal_431]
mov eax, dword [esp + 0x64]
inc ebx
cmp ebx, eax
jl 0x403310
jmp 0x40346b
mov edi, 8
jmp 0x40346b
mov eax, dword [esi + 0x104]
xor ebx, ebx
cmp eax, ebx
je 0x403462
push eax
call dword [sym.imp.MSVCRT.dll_remove]
mov edx, dword [esi + 0x104]
push edx
jmp 0x40344d
mov eax, dword [esi + 0x104]
xor ebx, ebx
cmp eax, ebx
je 0x403462
push eax
call dword [sym.imp.MSVCRT.dll_remove]
mov eax, dword [esi + 0x104]
push eax
call dword [sym.imp.MSVCRT.dll_free]
mov dword [esi + 0x110], ebx
add esp, 8
mov dword [esi + 0x104], ebx
push esi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov ecx, dword [0x451574]
mov dx, word [esp + 0x30]
mov ebp, dword [sym.imp.MMFS2.dll_Ordinal_423]
mov esi, dword [esp + 0x6c]
mov word [ecx + 0x1a], dx
xor ebx, ebx
jmp 0x4036e3
mov eax, dword [0x451574]
mov ecx, dword [eax + 0x9c]
push ecx
call ebp
mov edx, dword [esp + 0x44]
mov dword [0x4513d0], eax
mov dword [0x4513cc], edx
jmp 0x4031a8
mov eax, dword [0x451574]
mov ecx, dword [eax + 0x9c]
push ecx
call ebp
mov ecx, dword [0x451574]
mov edx, dword [ecx + 0xc4]
mov ecx, dword [ecx + 0xd0]
mov dword [ecx + edx*4], eax
mov edx, dword [0x451574]
cmp dword [edx + 0xd4], ebx
jne 0x4034ea
cmp dword [esp + 0x24], ebx
jne 0x4035cf
xor ebx, ebx
mov ebp, dword [esp + 0x24]
mov word [esp + 0x48], bx
mov ecx, dword [0x451574]
lea eax, [esp + 0x48]
push 8
push eax
mov edx, dword [ecx + 0x9c]
push edx
call dword [sym.imp.MMFS2.dll_Ordinal_425]
mov edi, eax
test edi, edi
jne 0x4035cf
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x4035c2
mov eax, dword [0x451574]
mov ecx, dword [eax + 0x9c]
push ecx
call dword [sym.imp.MMFS2.dll_Ordinal_423]
mov esi, eax
mov eax, dword [esp + 0x4c]
add esi, eax
mov eax, dword [esp + 0x48]
and eax, 0xffff
sub eax, 0x3334
je 0x403658
sub eax, 2
je 0x4035f2
dec eax
jne 0x4035a7
test ebp, ebp
jne 0x4035a7
mov eax, dword [0x451574]
lea ecx, [esp + 0x14]
mov edx, dword [eax + 0x26c]
mov eax, dword [eax + 0x9c]
push edx
push ebp
lea edx, [esp + 0x50]
push ecx
push edx
push eax
call fcn.004161b0
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x4035cf
mov ecx, dword [esp + 0x14]
lea eax, [ecx + 4]
push eax
push eax
call fcn.00404dd0
mov ebp, 1
add esp, 8
mov dword [esp + 0x24], ebp
test ebx, ebx
je 0x4035af
test ebp, ebp
jne 0x4035cf
mov eax, dword [0x451574]
push esi
mov ecx, dword [eax + 0x9c]
push ecx
call dword [sym.imp.MMFS2.dll_Ordinal_430]
cmp word [esp + 0x48], 0x7f7f
jne 0x4034f3
mov eax, dword [0x451574]
mov ebp, dword [sym.imp.MMFS2.dll_Ordinal_423]
mov esi, dword [esp + 0x6c]
mov ecx, dword [eax + 0xc4]
inc ecx
xor ebx, ebx
mov dword [eax + 0xc4], ecx
jmp 0x4036e3
mov eax, dword [0x451574]
mov ecx, dword [eax + 0xd4]
test ecx, ecx
je 0x40364e
mov edx, dword [eax + 0x26c]
mov eax, dword [eax + 0x9c]
push edx
lea ecx, [esp + 0x38]
push 0
lea edx, [esp + 0x50]
push ecx
push edx
push eax
call fcn.004161b0
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x4035cf
mov ecx, dword [esp + 0x34]
test ecx, ecx
je 0x40364e
mov eax, dword [0x451574]
mov edx, dword [eax + 0xc4]
mov eax, dword [eax + 0xd4]
mov dword [eax + edx*4], ecx
mov eax, dword [esp + 0x20]
inc eax
mov dword [esp + 0x20], eax
mov ebx, 1
jmp 0x4035ab
mov eax, dword [0x451574]
lea edx, [esp + 0x50]
mov ecx, dword [eax + 0x26c]
push ecx
push 0
push 0x10
push edx
mov edx, dword [eax + 0x9c]
lea ecx, [esp + 0x58]
push ecx
push edx
call fcn.00416120
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x4035cf
test byte [esp + 0x5c], 0x40
jne 0x4035a7
mov ebx, 1
jmp 0x4035ab
cmp eax, 0x6669
jg case.0x402de2.8741
cmp eax, 0x6666
jge 0x4036d4
cmp eax, 0x5555
jl case.0x402de2.8741
cmp eax, 0x5558
jg case.0x402de2.8741
lea edx, [esp + 0x40]
push edx
call fcn.00423280
jmp 0x4036de
lea eax, [esp + 0x40]
push eax
call fcn.00423240
add esp, 4
mov edi, eax
cmp edi, ebx
jne 0x403014
jmp 0x4031a8
mov edi, 8
jmp 0x403016
mov edi, 0x13
jmp 0x403016
cmp edi, ebx
jne 0x403014
cmp dword [esp + 0x20], ebx
jne 0x403731
mov ecx, dword [0x451574]
lea eax, [ecx + 0xd4]
mov ecx, dword [ecx + 0xd4]
cmp ecx, ebx
je 0x403731
push eax
call fcn.0041cd50
add esp, 4
mov eax, dword [0x451574]
mov edx, dword [esp + 0x68]
mov dword [eax + 0x1e8], edx
mov ecx, dword [0x451574]
mov edx, dword [ecx + 0xc0]
push edx
call fcn.0043a870
add esp, 4
cmp esi, ebx
jne 0x4037ae
cmp dword [esp + 0x10], ebx
jne 0x4037ae
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x403790
mov esi, dword [0x451558]
push eax
call dword [sym.imp.GDI32.dll_CreatePalette]
mov dword [0x451558], eax
push eax
mov eax, dword [0x451504]
push eax
call sub.MMFS2.dll_Ordinal_121
cmp esi, ebx
je 0x403790
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
call fcn.0043e2c0
mov edi, eax
cmp edi, ebx
jne 0x403014
call fcn.004039c0
mov edi, eax
cmp edi, ebx
jne 0x403014
mov edx, dword [0x451574]
mov ecx, dword [0x451544]
mov dword [edx + 0x1c4], ecx
call fcn.00402530
test eax, eax
je 0x403924
mov eax, dword [0x451574]
mov esi, dword [sym.imp.USER32.dll_GetMenuState]
mov ebp, dword [sym.imp.USER32.dll_DeleteMenu]
mov eax, dword [eax + 0xb0]
cmp eax, ebx
je 0x403811
cmp dword [esp + 0x20], ebx
jne 0x403811
push ebx
push 0x3f3
push eax
call esi
cmp eax, 0xffffffff
je 0x403811
mov ecx, dword [0x451574]
push ebx
push 0x3f3
mov edx, dword [ecx + 0xb0]
push edx
call ebp
mov eax, dword [0x451574]
mov eax, dword [eax + 0xb0]
cmp eax, ebx
je 0x40386f
push ebx
push 0x401
push eax
call esi
cmp eax, 0xffffffff
je 0x40386f
mov eax, dword [0x451574]
test byte [eax + 0x15], 0x10
je 0x403842
test byte [0x45155c], 0x20
je 0x40386f
mov ecx, dword [eax + 0xb0]
push ebx
push 0x401
push ecx
call ebp
mov edx, dword [0x451574]
push 1
mov eax, dword [edx + 0xb0]
push eax
call dword [sym.imp.USER32.dll_GetSubMenu]
push eax
call fcn.0043a820
add esp, 4
mov esi, dword [esp + 0x6c]
cmp esi, ebx
jne 0x4038a4
mov ecx, dword [0x451574]
test byte [ecx + 0x16], 8
je 0x4038a4
mov edx, dword [0x451548]
push ebx
push ebx
push ebx
push 4
push edx
call sub.MMFS2.dll_Ordinal_31
or al, 4
push eax
mov eax, dword [0x451548]
push 2
push eax
call sub.MMFS2.dll_Ordinal_31
mov eax, dword [0x451550]
cmp esi, ebx
je 0x4038b3
mov eax, dword [esi + 0x1d0]
cmp dword [esp + 0x10], ebx
jne 0x4038d6
mov ecx, dword [esp + 0x78]
mov edx, dword [esp + 0x74]
push ecx
push edx
push eax
call fcn.0042ede0
mov edi, eax
add esp, 0xc
cmp edi, ebx
jne 0x403014
cmp esi, ebx
jne 0x403016
mov eax, dword [0x451574]
test byte [eax + 0x15], 8
je 0x403016
push 1
call fcn.0043a150
add esp, 4
call fcn.00402530
jmp 0x403016
xor eax, eax
pop esi
add esp, 0x50
ret
or edi, 0xffffffff
jmp 0x403014
mov edi, 4
jmp 0x403014
mov edi, 0x14
jmp 0x403016
or edi, 0xffffffff
jmp 0x403016
call fcn.00402640
mov eax, dword [esp + 0x18]
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x50
ret