Function at 0x401970
Capabilities:
Delete file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
test dword [0x43c4c0], 0x80000000
push ebx
push esi
push edi
mov edi, edx
mov dword [ebp - 0x10], 0xffffffff
je 0x401a30
cmp dword [0x43bcbc], 0
jne 0x4019b7
push 0
push 0x43af1c
push 0x43bcc0
call dword [sym.imp.gdiplus.dll_GdiplusStartup]
neg eax
sbb eax, eax
inc eax
mov dword [0x43bcbc], eax
cmp dword [0x43bd04], 0
jne 0x4019e1
mov edx, dword [0x43c184]
mov ecx, 0x43bd04
push 0x800000e6
call fcn.00417780
test eax, eax
je 0x401a30
or word [0x43ac6a], 1
push 0x44
call fcn.0041d6de
mov esi, eax
add esp, 4
test esi, esi
jne 0x401a3a
movzx eax, word [0x43ad06]
sub eax, 7
je 0x401a15
sub eax, 2
je 0x401a0e
sub eax, 1
jne 0x401a0e
mov eax, dword [str.El_sistema_no_puede_asignar_suficiente_memoria]
jmp 0x401a1a
mov eax, dword [str.The_system_cannot_allocate_enough_memory]
jmp 0x401a1a
mov eax, dword [str.Der_Speicher_reicht_nicht]
push eax
push 0xa8010f00
call fcn.00413190
add esp, 8
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x18], 0
mov dword [esi + 0x1c], 0
mov dword [esi + 0x20], 0
mov dword [esi + 0x24], 0
mov dword [esi + 0x28], 0
mov dword [esi + 0x2c], 0
mov dword [esi + 0x30], 0
mov dword [esi + 0x34], 0
mov dword [esi + 0x38], 0
push 0x43c540
mov dword [esi + 0x3c], 0
push edi
mov dword [esi + 0x40], 0
mov ebx, dword [sym.imp.USER32.dll_wsprintfW]
push str._sBoard__s.bmp
push 0x43bee0
mov dword [esi + 8], 0xffffffff
mov dword [esi + 0x14], 0xffffffff
mov dword [ebp - 0x28], ebx
call ebx
mov edi, dword [0x43bd04]
add esp, 0x10
test edi, edi
je 0x401b23
mov edx, edi
lea ecx, [edx + 2]
nop dword [eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x401ae0
sub edx, ecx
sar edx, 1
je 0x401b23
xor eax, eax
mov ecx, 0x437434
cmp word [edi + edx*2 - 2], 0x5c
mov edx, 0x43bee0
cmove ecx, eax
cmp word [0x43bee0], 0x5c
mov eax, 0x43bee2
cmovne eax, edx
push eax
push edi
push ecx
call fcn.00414380
add esp, 0xc
jmp 0x401b25
xor eax, eax
push dword [0x43a97c]
mov dword [esi + 4], eax
push str.ImagesBoard__u.bmp
push 0x43bee0
call ebx
add esp, 0xc
mov edx, 4
mov ecx, 0x43bee0
call fcn.00411510
push 0x7f02
mov dword [esi], eax
mov eax, dword [sym.imp.USER32.dll_LoadCursorW]
push 0
mov dword [ebp - 0x2c], eax
call eax
push eax
mov eax, dword [sym.imp.USER32.dll_SetCursor]
mov dword [ebp - 0x30], eax
call eax
mov edx, dword [esi]
mov ecx, dword [esi + 4]
push 0
call fcn.004124c0
test eax, eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], eax
je 0x4021d8
mov eax, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0x80
push dword [esi + 4]
mov dword [ebp - 0x24], eax
call eax
push 0
push ecx
mov ecx, dword [esi + 4]
mov edx, 3
push 0x80
push 3
call fcn.00411d20
mov ecx, eax
mov dword [esi + 8], eax
call fcn.00414750
mov dword [esi + 0xc], eax
test eax, eax
je 0x401e90
mov eax, dword [esi]
test eax, eax
je 0x401bd9
push eax
call fcn.0041d6c3
add esp, 4
mov dword [esi], 0
push dword [0x43a97c]
push str.ImagesPieces__u.bmp
push 0x43bee0
call ebx
add esp, 0xc
mov edx, 4
mov ecx, 0x43bee0
call fcn.00411510
mov ecx, eax
mov dword [esi], eax
call fcn.00411bc0
mov ecx, eax
mov dword [esi + 0x14], eax
call fcn.00414750
mov ecx, eax
mov dword [esi + 0x18], ecx
test ecx, ecx
je 0x401e90
mov edi, dword [ecx + 0xc]
lea eax, [edi + edi*2]
shl eax, 2
cmp eax, dword [ecx + 8]
jne 0x401e90
mov ecx, dword [esi + 0xc]
mov dword [esi + 0x34], edi
mov eax, dword [ecx + 8]
mov dword [esi + 0x40], eax
lea eax, [edi*8]
mov edx, dword [ecx + 8]
sub edx, eax
mov dword [esi + 0x38], edx
mov ecx, dword [ecx + 0xc]
sub ecx, eax
mov dword [esi + 0x3c], ecx
test dl, 1
jne 0x401e90
test cl, 1
jne 0x401e90
mov eax, edx
imul edi, edi
cdq
sub eax, edx
sar eax, 1
mov dword [esi + 0x38], eax
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
mov dword [esi + 0x3c], eax
lea eax, [edi + edi*2]
cmp eax, 1
jae 0x401c8f
mov dword [esi + 0x20], 0
jmp 0x401e90
push eax
call fcn.0041d6de
mov ebx, dword [sym.imp.KERNEL32.dll_SetLastError]
mov edi, eax
add esp, 4
mov dword [ebp - 0x20], ebx
test edi, edi
jne 0x401ce2
movzx ecx, word [0x43ad06]
sub ecx, 7
je 0x401ccb
sub ecx, 2
je 0x401cbd
sub ecx, 1
je 0x401cc4
mov eax, dword [str.The_system_cannot_allocate_enough_memory]
jmp 0x401cd0
mov eax, dword [str.El_sistema_no_puede_asignar_suficiente_memoria]
jmp 0x401cd0
mov eax, dword [str.Der_Speicher_reicht_nicht]
push eax
push 0xa8010f00
call fcn.00413190
add esp, 8
push 0xe
call ebx
mov dword [esi + 0x20], edi
test edi, edi
je 0x401e90
mov edx, dword [0x43a978]
movzx eax, byte [edx*4 + 0x43a962]
movzx ecx, word [edx*4 + 0x43a960]
mov byte [esi + 0x28], al
mov eax, ecx
shr eax, 8
mov byte [esi + 0x29], al
movzx eax, byte [edx*4 + 0x43a946]
mov byte [esi + 0x2a], cl
movzx ecx, word [edx*4 + 0x43a944]
mov byte [esi + 0x2b], al
mov eax, ecx
shr eax, 8
mov byte [esi + 0x2c], al
mov eax, dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov byte [esi + 0x2d], cl
mov ecx, 0x2b
mov dword [ebp - 0x14], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
mov byte [esi + 0x30], 0
mov dword [ebp - 0x18], eax
nop dword [eax + eax]
xor al, al
mov byte [esi + 0x2f], 0
mov byte [ebp - 5], al
nop dword [eax]
movzx edi, byte [esi + 0x30]
mov edx, 7
movzx eax, al
add eax, edi
mov dword [ebp - 0xc], 0
test al, 1
mov eax, 0x28
cmovne eax, ecx
sub edx, edi
add eax, esi
mov dword [esi + 0x24], eax
imul edx, dword [esi + 0x40]
movzx eax, byte [ebp - 5]
mov ebx, dword [esi + 0x34]
add edx, eax
mov eax, dword [esi + 0x3c]
imul eax, dword [esi + 0x40]
imul edx, ebx
add edx, eax
mov eax, dword [esi + 0x38]
add edx, 0x12
add eax, edx
lea eax, [eax + eax*2]
mov dword [ebp - 0x1c], eax
test ebx, ebx
je 0x401e21
mov edi, dword [esi + 8]
cmp eax, 0x7fffffff
ja 0x401e90
push 0
push 0
push eax
push edi
call dword [ebp - 0x14]
cmp eax, 0xffffffff
jne 0x401dd8
call dword [ebp - 0x18]
test eax, eax
jne 0x401e80
mov edx, dword [esi + 0x34]
xor edi, edi
test edx, edx
je 0x401e08
mov edx, dword [esi + 0x24]
mov ecx, dword [esi + 8]
push 0x20010016
push 0
push 3
call fcn.00412150
add esp, 0xc
test eax, eax
je 0x401e90
mov edx, dword [esi + 0x34]
inc edi
cmp edi, edx
jb 0x401de1
mov ecx, dword [esi + 0x40]
mov eax, dword [ebp - 0x1c]
add eax, ecx
lea eax, [eax + ecx*2]
mov ecx, dword [ebp - 0xc]
inc ecx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0xc], ecx
cmp ecx, edx
jb 0x401db1
mov al, byte [esi + 0x2f]
mov ecx, 0x2b
inc al
mov byte [esi + 0x2f], al
mov byte [ebp - 5], al
cmp al, 8
jb 0x401d60
inc byte [esi + 0x30]
mov al, byte [esi + 0x30]
cmp al, 8
jb 0x401d50
mov byte [esi + 0x30], 0
nop dword [eax + eax]
mov byte [esi + 0x2f], 0
xor al, al
nop word [eax + eax]
movzx ecx, byte [esi + 0x30]
movzx eax, al
movzx eax, byte [eax + ecx*8 + 0x43c440]
dec eax
cmp eax, 0xb
ja case.default.0x401e79
jmp dword [eax*4 + 0x4021e0]
push edi
xor edx, edx
mov ecx, 0xa0010017
call fcn.00411f50
add esp, 4
mov ebx, dword [ebp - 4]
mov eax, dword [esi + 0x20]
test eax, eax
je 0x401eaa
push eax
call fcn.0041d6c3
add esp, 4
mov dword [esi + 0x20], 0
mov eax, dword [esi + 0xc]
test eax, eax
je 0x401ec1
push eax
call fcn.0041d6c3
add esp, 4
mov dword [esi + 0xc], 0
mov eax, dword [esi + 0x18]
test eax, eax
je 0x401ed8
push eax
call fcn.0041d6c3
add esp, 4
mov dword [esi + 0x18], 0
mov eax, dword [esi + 4]
test eax, eax
je 0x401eef
push eax
call fcn.0041d6c3
add esp, 4
mov dword [esi + 4], 0
mov eax, dword [esi]
test eax, eax
je 0x401f04
push eax
call fcn.0041d6c3
add esp, 4
mov dword [esi], 0
mov edi, dword [esi + 8]
cmp edi, 0xffffffff
je 0x401f27
push edi
call ebx
test eax, eax
jne 0x401f20
push edi
xor edx, edx
xor ecx, ecx
call fcn.00411f50
add esp, 4
mov dword [esi + 8], 0xffffffff
mov edi, dword [esi + 0x14]
cmp edi, 0xffffffff
je 0x401f4a
push edi
call ebx
test eax, eax
jne 0x401f43
push edi
xor edx, edx
xor ecx, ecx
call fcn.00411f50
add esp, 4
mov dword [esi + 0x14], 0xffffffff
push esi
call fcn.0041d6c3
add esp, 4
push 0x7f00
push 0
call dword [ebp - 0x2c]
push eax
call dword [ebp - 0x30]
mov eax, dword [ebp - 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x1c], 6
jmp 0x401fd5
mov dword [esi + 0x1c], 0
jmp 0x401fd5
mov dword [esi + 0x1c], 7
jmp 0x401fd5
mov dword [esi + 0x1c], 1
jmp 0x401fd5
mov dword [esi + 0x1c], 8
jmp 0x401fd5
mov dword [esi + 0x1c], 2
jmp 0x401fd5
mov dword [esi + 0x1c], 9
jmp 0x401fd5
mov dword [esi + 0x1c], 3
jmp 0x401fd5
mov dword [esi + 0x1c], 0xa
jmp 0x401fd5
mov dword [esi + 0x1c], 4
jmp 0x401fd5
mov dword [esi + 0x1c], 0xb
jmp 0x401fd5
mov dword [esi + 0x1c], 5
mov ecx, esi
call fcn.00401720
test eax, eax
je 0x401e90
mov al, byte [esi + 0x2f]
inc al
mov byte [esi + 0x2f], al
cmp al, 8
jb 0x401e60
inc byte [esi + 0x30]
mov al, byte [esi + 0x30]
cmp al, 8
jb 0x401e50
mov edi, dword [esi + 8]
cmp edi, 0xffffffff
je 0x402034
mov ebx, dword [ebp - 4]
push edi
call ebx
test eax, eax
jne 0x40202d
push edi
xor edx, edx
xor ecx, ecx
call fcn.00411f50
add esp, 4
mov dword [esi + 8], 0xffffffff
jmp 0x401e93
mov dword [esi + 8], 0xffffffff
mov ecx, dword [esi + 4]
mov edx, 0x43bee0
mov dword [ebp - 0x10], 1
sub edx, ecx
movzx eax, word [ecx]
mov word [edx + ecx], ax
add ecx, 2
test ax, ax
jne 0x402045
mov ebx, dword [ebp + 0xc]
cmp ebx, 1
je 0x4021a3
call fcn.004114b0
mov edi, eax
cmp word [edi], 0x2e
jne 0x4021a3
mov ecx, dword [ebx*4 + 0x43a930]
add edi, 2
mov edx, edi
nop dword [eax]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx], ax
lea edx, [edx + 2]
test ax, ax
jne 0x402080
mov ecx, dword [esi + 4]
call fcn.00409730
test eax, eax
jne 0x402167
mov ecx, dword [0x43bd20]
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
test ecx, ecx
je 0x4020c2
call ebx
mov ecx, dword [0x43bd20]
cmp ecx, eax
mov eax, dword [0x43acbc]
je 0x4020c7
mov eax, dword [0x43ac6c]
mov dword [ebp - 0xc], eax
test ecx, ecx
je 0x4020dd
call ebx
cmp dword [0x43bd20], eax
mov eax, 0x43acbc
je 0x4020e2
mov eax, 0x43ac6c
or dword [eax], 0x200000
xor edx, edx
lea eax, [ebp - 0x18]
mov ecx, 0x43bee0
push eax
call fcn.00411a30
mov dword [ebp - 0x14], eax
cmp eax, 1
jb 0x402109
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [0x43bd20], 0
je 0x402121
call ebx
cmp dword [0x43bd20], eax
mov eax, 0x43acbc
je 0x402126
mov eax, 0x43ac6c
cmp dword [ebp - 0x14], 1
mov ecx, dword [ebp - 0xc]
mov dword [eax], ecx
jne 0x402167
mov eax, dword [ebp + 0xc]
mov edi, dword [esi + 4]
push 0
mov dword [ebp - 0x10], eax
call dword [ebp - 0x20]
push 0x80
push edi
call dword [ebp - 0x24]
test eax, eax
je 0x402157
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4021a3
push edi
push 0xe001000c
call fcn.00413190
add esp, 8
jmp 0x4021a3
push edi
push str._s_Encoder
push 0x43bee0
call dword [ebp - 0x28]
add esp, 0xc
push 0x43bee0
push 0x20010029
call fcn.00413190
mov ecx, dword [esi + 4]
mov edx, 0x43bee0
add esp, 8
sub edx, ecx
movzx eax, word [ecx]
mov word [edx + ecx], ax
add ecx, 2
test ax, ax
jne 0x402194
cmp dword [ebp + 8], 0
je 0x401e90
test byte [0x43a95c], 0x20
je 0x4021c9
push ecx
mov ecx, 0x43bee0
call fcn.004148e0
test eax, eax
jne 0x401e90
push 0x20010000
call fcn.00413190
jmp 0x401e8d
mov ebx, eax
jmp 0x401e93