Function at 0x56cd80
Capabilities:
Move file

Disassembly:
sub esp, 0xfa8
mov eax, dword [0x65ada4]
xor eax, esp
mov dword [esp + 0xfa4], eax
mov eax, dword [esp + 0xfac]
mov ecx, dword [esp + 0xfb4]
mov edx, dword [esp + 0xfbc]
push ebx
mov ebx, dword [esp + 0xfb4]
push ebp
mov ebp, dword [esp + 0xfc0]
push edi
mov edi, dword [esp + 0xfcc]
mov dword [esp + 0x18], eax
mov dword [esp + 0x28], ebx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x14], edx
mov dword [esp + 0xc], 1
mov dword [esp + 0x10], 0
mov byte [esp + 0x30], 0
test ebx, ebx
je 0x56ce18
push 0x3d
push ebx
call dword [sym.imp.MSVCR90.dll_strchr]
add esp, 8
test eax, eax
je 0x56ce18
pop edi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0xfa4]
xor ecx, esp
call fcn.00586584
add esp, 0xfa8
ret
lea edx, [esp + 0xbb0]
mov eax, edi
sub edx, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x56ce23
push esi
lea eax, [esp + 0xbb4]
push 0x2e
push eax
call dword [sym.imp.MSVCR90.dll_strrchr]
mov esi, eax
add esp, 8
test esi, esi
je 0x56ce80
push str..ini
push esi
call dword [sym.imp.MSVCR90.dll__stricmp]
add esp, 8
test eax, eax
jne 0x56ce80
push str..bak
push esi
call dword [sym.imp.MSVCR90.dll_sprintf]
lea edx, [esp + 0x6bc]
add esp, 8
mov eax, edi
sub edx, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x56ce74
jmp 0x56cea9
mov esi, dword [sym.imp.MSVCR90.dll_sprintf]
push edi
lea ecx, [esp + 0x6b8]
push str._s.ini
push ecx
call esi
push edi
lea edx, [esp + 0xbc4]
push 0x5b1cc8
push edx
call esi
add esp, 0x18
mov esi, dword [esp + 0x1c]
test esi, esi
jne 0x56cee1
lea eax, [esp + 0x6b4]
push 0x5a845c
push eax
call dword [sym.imp.MSVCR90.dll_fopen]
add esp, 8
test eax, eax
je 0x56cf63
push eax
call dword [sym.imp.MSVCR90.dll_fclose]
add esp, 4
lea eax, [esi + 1]
jmp 0x56d42b
push edi
push 0x100
lea ecx, [esp + 0x1bc]
push ecx
push 0x5a8a1a
push ebx
push esi
call fcn.0056c9c0
add esp, 0x18
test eax, eax
je 0x56cf63
cmp eax, 2
jne 0x56cf6a
cmp dword [esp + 0x18], 0
je 0x56cfb5
test ebp, ebp
je 0x56cf38
push edi
push 0x100
lea edx, [esp + 0x1bc]
push edx
push 0x5a8a1a
push ebp
push esi
call fcn.0056c9c0
add esp, 0x18
cmp eax, 2
jne 0x56cf63
mov eax, dword [esp + 0x28]
test eax, eax
je 0x56cfbf
push edi
push 0x100
lea ecx, [esp + 0x1bc]
push ecx
push 0x5a8a1a
push 0
push eax
call fcn.0056c9c0
add esp, 0x18
cmp eax, 2
je 0x56cfbf
xor eax, eax
jmp 0x56d42b
cmp eax, 1
jne 0x56cf12
mov eax, dword [esp + 0x18]
test eax, eax
je 0x56cf12
lea ecx, [esp + 0x1b4]
mov edi, edi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x56cfa0
test dl, dl
je 0x56cf9c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x56cfa0
add eax, 2
add ecx, 2
test dl, dl
jne 0x56cf80
xor eax, eax
jmp 0x56cfa5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x56cf12
test ebp, ebp
jne 0x56cf16
mov eax, 2
jmp 0x56d42b
mov esi, dword [sym.imp.MSVCR90.dll_fopen]
lea edx, [esp + 0x6b4]
push 0x5a8460
push edx
mov byte [esp + 0x2bc], 0
mov dword [esp + 0x28], 0
call esi
mov ebp, eax
add esp, 8
mov dword [esp + 0x24], ebp
test ebp, ebp
jne 0x56d009
lea eax, [esp + 0x6b4]
push eax
lea ecx, [esp + 0xbb8]
push ecx
call sub.MSVCR90.dll_rename
add esp, 8
lea edx, [esp + 0xbb4]
push 0x5a845c
push edx
call esi
mov edi, eax
add esp, 8
test edi, edi
je 0x56d40d
cmp dword [esp + 0x24], 0
mov ebp, dword [sym.imp.MSVCR90.dll_fprintf]
jne 0x56d050
lea eax, [esp + 0x6b4]
push 0x5a8460
push eax
call esi
add esp, 8
mov dword [esp + 0x24], eax
test eax, eax
je 0x56d32a
mov ecx, dword [esp + 0x24]
push ecx
lea edx, [esp + 0x2b8]
push 0x400
push edx
call dword [sym.imp.MSVCR90.dll_fgets]
add esp, 0xc
test eax, eax
je 0x56d32a
mov esi, dword [esp + 0x10]
lea eax, [esp + 0x2b4]
push eax
lea ecx, [esp + 0xb8]
call fcn.0056c8c0
add esp, 4
test eax, eax
je 0x56d1a5
cmp dword [esp + 0x14], 0
jne 0x56d0db
mov ecx, dword [esp + 0x1c]
push ecx
lea edx, [esp + 0x38]
push edx
call dword [sym.imp.MSVCR90.dll__stricmp]
add esp, 8
test eax, eax
jne 0x56d0db
mov eax, dword [esp + 0x18]
push eax
push ebx
push str._s_s_n
push edi
call ebp
add esp, 0x10
test eax, eax
jl 0x56d393
xor esi, esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], 1
mov ecx, dword [esp + 0x1c]
push ecx
lea edx, [esp + 0xb8]
push edx
call dword [sym.imp.MSVCR90.dll__stricmp]
add esp, 8
test eax, eax
jne 0x56d152
cmp dword [esp + 0x28], eax
je 0x56d12c
mov eax, 0x5a8a1a
test esi, esi
jne 0x56d109
mov eax, 0x5a8fe8
mov ecx, dword [esp + 0x28]
push ecx
push eax
push str._s__s__n
push edi
call ebp
add esp, 0x10
test eax, eax
jl 0x56d393
mov dword [esp + 0x14], 1
jmp 0x56d17c
test ebx, ebx
jne 0x56d13a
mov dword [esp + 0x14], 1
jmp 0x56d184
mov eax, 0x5a8a1a
test esi, esi
jne 0x56d148
mov eax, 0x5a8fe8
lea edx, [esp + 0x2b4]
push edx
jmp 0x56d168
mov eax, 0x5a8a1a
test esi, esi
jne 0x56d160
mov eax, 0x5a8fe8
lea ecx, [esp + 0x2b4]
push ecx
push eax
push str._s_s
push edi
call ebp
add esp, 0x10
test eax, eax
jl 0x56d393
mov dword [esp + 0x10], 0
xor eax, eax
jmp 0x56d190
mov cl, byte [esp + eax + 0xb4]
mov byte [esp + eax + 0x34], cl
inc eax
test cl, cl
jne 0x56d190
jmp 0x56d303
cmp dword [esp + 0x28], 0
je 0x56d1d5
lea eax, [esp + 0x2b4]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x56d1b6
sub eax, edx
cmp eax, 1
jbe 0x56d303
lea edx, [esp + 0x2b4]
push edx
jmp 0x56d2e8
test ebx, ebx
jne 0x56d1fd
mov eax, dword [esp + 0x1c]
push eax
lea ecx, [esp + 0x38]
push ecx
call dword [sym.imp.MSVCR90.dll__stricmp]
add esp, 8
test eax, eax
jne 0x56d1fd
mov dword [esp + 0x14], 1
jmp 0x56d303
lea edx, [esp + 0xab4]
push edx
lea eax, [esp + 0x138]
push eax
lea ebx, [esp + 0x2bc]
call fcn.0056c850
add esp, 8
test eax, eax
je 0x56d2c8
mov edx, dword [esp + 0x1c]
mov ebx, dword [sym.imp.MSVCR90.dll__stricmp]
lea ecx, [esp + 0x34]
push ecx
push edx
call ebx
add esp, 8
test eax, eax
jne 0x56d2a5
mov eax, dword [esp + 0x2c]
push eax
lea ecx, [esp + 0x138]
push ecx
call ebx
add esp, 8
test eax, eax
jne 0x56d2a5
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x18]
test eax, eax
jne 0x56d270
test ecx, ecx
jne 0x56d27b
mov dword [esp + 0x14], 1
jmp 0x56d303
test ecx, ecx
jne 0x56d27b
lea ecx, [esp + 0xab4]
test eax, eax
jne 0x56d286
lea eax, [esp + 0x134]
push ecx
push eax
push str._s_s_n
push edi
call ebp
add esp, 0x10
test eax, eax
jl 0x56d393
mov dword [esp + 0x14], 1
jmp 0x56d2fb
lea eax, [esp + 0x2b4]
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x56d2b0
sub eax, edx
cmp eax, 1
jbe 0x56d303
lea edx, [esp + 0x2b4]
push edx
jmp 0x56d2e8
lea eax, [esp + 0x2b4]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x56d2d2
sub eax, edx
cmp eax, 1
jbe 0x56d303
lea eax, [esp + 0x2b4]
push eax
push 0x5a85d0
push edi
call ebp
add esp, 0xc
test eax, eax
jl 0x56d393
mov dword [esp + 0x10], 0
mov ecx, dword [esp + 0x24]
push ecx
lea edx, [esp + 0x2b8]
push 0x400
push edx
call dword [sym.imp.MSVCR90.dll_fgets]
mov ebx, dword [esp + 0x38]
add esp, 0xc
test eax, eax
jne 0x56d073
test ebx, ebx
je 0x56d38b
cmp dword [esp + 0x14], 0
jne 0x56d38b
mov esi, dword [esp + 0x1c]
lea eax, [esp + 0x34]
push esi
push eax
call dword [sym.imp.MSVCR90.dll__stricmp]
add esp, 8
test eax, eax
je 0x56d36e
cmp dword [esp + 0x10], 0
mov eax, 0x5a8a1a
jne 0x56d35d
mov eax, 0x5a8fe8
push esi
push eax
push str._s__s__n
push edi
call ebp
add esp, 0x10
test eax, eax
jl 0x56d393
mov ecx, dword [esp + 0x18]
push ecx
push ebx
push str._s_s_n
push edi
call ebp
add esp, 0x10
test eax, eax
jl 0x56d393
mov dword [esp + 0x14], 1
mov dword [esp + 0x20], 1
mov esi, dword [sym.imp.MSVCR90.dll_fclose]
push edi
call esi
add esp, 4
test eax, eax
je 0x56d3ab
mov dword [esp + 0x20], 0
mov eax, dword [esp + 0x24]
test eax, eax
je 0x56d3b9
push eax
call esi
add esp, 4
cmp dword [esp + 0x20], 0
je 0x56d427
cmp dword [esp + 0x14], 1
jne 0x56d427
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
mov esi, 0x14
lea edx, [esp + 0x6b4]
push edx
call sub.MSVCR90.dll__unlink
lea eax, [esp + 0x6b8]
push eax
lea ecx, [esp + 0xbbc]
push ecx
call sub.MSVCR90.dll_rename
add esp, 0xc
cmp eax, 0xffffffff
jne 0x56d407
push 0x32
call edi
dec esi
test esi, esi
jg 0x56d3d2
jmp 0x56d41f
test esi, esi
jg 0x56d427
jmp 0x56d41f
test ebp, ebp
je 0x56d427
push ebp
call dword [sym.imp.MSVCR90.dll_fclose]
add esp, 4
test eax, eax
je 0x56d427
mov dword [esp + 0x20], 0
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0xfb4]
pop esi
pop edi
pop ebp
pop ebx
xor ecx, esp
call fcn.00586584
add esp, 0xfa8
ret