Function at 0x435766
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x78
mov eax, dword [0x4d0620]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [ebp - 0x44], eax
mov eax, dword [ebp + 0xc]
xor ebx, ebx
push ebx
mov dword [ebp - 0x74], eax
mov eax, dword [ebp + 0x10]
mov edi, 0x8000
push edi
push eax
mov byte [ebp - 0x2d], 0
mov dword [ebp - 0x34], ebx
call fcn.00481791
mov esi, eax
add esp, 0xc
cmp esi, ebx
mov dword [ebp - 0x38], esi
jl 0x435b69
push 2
push ebx
push esi
call fcn.0048bdd5
add esp, 0xc
cmp eax, 0xffffffff
mov dword [ebp - 0x50], eax
je 0x435b69
push ebx
push ebx
push esi
call fcn.0048bdd5
add esp, 0xc
test eax, eax
jne 0x435b69
cmp dword [ebp - 0x50], 0x20
jge 0x4357e9
push str.Corrupt_patch_n
jmp 0x435b6e
push 0x20
lea eax, [ebp - 0x2c]
push eax
push esi
call fcn.004926b6
add esp, 0xc
cmp eax, 0x20
je 0x435807
push str.patchfile_is_too_small__Corrupt_patch_n
jmp 0x435b6e
push 8
lea eax, [ebp - 0x2c]
push str.QSUFDIFF
push eax
call fcn.0047beeb
add esp, 0xc
test eax, eax
jne 0x435825
mov dword [ebp - 0x34], 1
push 8
lea eax, [ebp - 0x2c]
push str.BSDIFF30
push eax
call fcn.0047beeb
add esp, 0xc
test eax, eax
jne 0x435843
mov dword [ebp - 0x34], 1
push 8
lea eax, [ebp - 0x2c]
push str.BSDIFF40
push eax
call fcn.0047beeb
add esp, 0xc
test eax, eax
jne 0x435861
mov dword [ebp - 0x34], 2
cmp dword [ebp - 0x34], ebx
jne 0x435870
push str.wrong_version__Corrupt_patch_n
jmp 0x435b6e
lea ecx, [ebp - 0x24]
call fcn.0043573f
lea ecx, [ebp - 0x1c]
mov esi, eax
call fcn.0043573f
lea ecx, [ebp - 0x14]
mov ebx, eax
call fcn.0043573f
test esi, esi
mov dword [ebp - 0x40], eax
jl 0x435b62
test ebx, ebx
jl 0x435b62
test eax, eax
jl 0x435b62
cmp dword [ebp - 0x34], 1
jne 0x4358ba
lea eax, [ebx + esi + 0x20]
cmp eax, dword [ebp - 0x50]
jne 0x435b62
push 0
lea eax, [esi + 0x20]
push edi
push dword [ebp - 0x44]
lea esi, [ebx + esi + 0x20]
mov dword [ebp - 0x58], 0x20
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x6c], esi
mov dword [ebp - 0x4c], esi
call fcn.00481791
mov esi, eax
xor ebx, ebx
add esp, 0xc
cmp esi, ebx
jl 0x435b5b
push 2
push ebx
push esi
call fcn.0048bdd5
mov edi, eax
add esp, 0xc
cmp edi, 0xffffffff
mov dword [ebp - 0x68], edi
je 0x435b5b
lea eax, [edi + 1]
push eax
call fcn.0047dc09
cmp eax, ebx
pop ecx
mov dword [ebp - 0x44], eax
je 0x435b5b
push ebx
push ebx
push esi
call fcn.0048bdd5
add esp, 0xc
test eax, eax
jne 0x435b5b
push edi
push dword [ebp - 0x44]
push esi
call fcn.004926b6
add esp, 0xc
cmp eax, edi
jne 0x435b5b
push esi
call fcn.0048bf45
cmp eax, 0xffffffff
pop ecx
je 0x435b5b
mov edi, dword [ebp - 0x40]
lea eax, [edi + 1]
push eax
call fcn.0047dc09
cmp eax, ebx
pop ecx
mov dword [ebp - 0x54], eax
jne 0x435973
push str.no_memory_n
jmp 0x435b6e
xor esi, esi
cmp edi, ebx
mov dword [ebp - 0x3c], ebx
jle 0x435ac0
mov ebx, dword [ebp - 0x58]
cmp ebx, dword [ebp - 0x70]
jg 0x435b74
xor edi, edi
push edi
push ebx
push dword [ebp - 0x38]
call fcn.0048bdd5
add esp, 0xc
cmp dword [ebp - 0x34], edi
jl 0x4359da
push 8
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x38]
call fcn.00435703
add esp, 0xc
test eax, eax
jl 0x435b1c
cmp eax, 8
jl 0x435b23
lea ecx, [ebp - 0xc]
call fcn.0043573f
add ebx, 8
mov dword [ebp + edi*4 - 0x64], eax
inc edi
cmp edi, dword [ebp - 0x34]
mov dword [ebp - 0x58], ebx
jle 0x4359a0
cmp dword [ebp - 0x34], 1
jne 0x4359e6
mov eax, dword [ebp - 0x60]
add dword [ebp - 0x3c], eax
mov edi, dword [ebp - 0x64]
lea eax, [edi + esi]
cmp eax, dword [ebp - 0x40]
mov dword [ebp - 0x78], eax
jg 0x435b2a
mov eax, dword [ebp - 0x48]
cmp eax, dword [ebp - 0x6c]
jg 0x435b31
push 0
push eax
push dword [ebp - 0x38]
call fcn.0048bdd5
mov ebx, dword [ebp - 0x54]
push edi
add esi, ebx
push esi
push dword [ebp - 0x38]
call fcn.00435703
add esp, 0x18
test eax, eax
jl 0x435b1c
add dword [ebp - 0x48], edi
cmp eax, edi
jne 0x435b38
xor eax, eax
test edi, edi
jle 0x435a5a
mov edx, dword [ebp - 0x3c]
lea ecx, [eax + edx]
test ecx, ecx
jl 0x435a55
cmp ecx, dword [ebp - 0x68]
jge 0x435a55
lea ecx, [eax + edx]
mov edx, dword [ebp - 0x44]
mov cl, byte [ecx + edx]
add byte [esi + eax], cl
inc eax
cmp eax, edi
jl 0x435a3a
add dword [ebp - 0x3c], edi
cmp dword [ebp - 0x34], 2
mov esi, dword [ebp - 0x78]
jne 0x435ab7
mov eax, dword [ebp - 0x60]
lea edi, [eax + esi]
cmp edi, dword [ebp - 0x40]
jg 0x435b3f
mov eax, dword [ebp - 0x4c]
cmp eax, dword [ebp - 0x50]
jg 0x435b46
push 0
push eax
push dword [ebp - 0x38]
call fcn.0048bdd5
push dword [ebp - 0x60]
add esi, ebx
push esi
push dword [ebp - 0x38]
call fcn.00435703
add esp, 0x18
test eax, eax
jl 0x435b1c
mov ecx, dword [ebp - 0x60]
cmp eax, ecx
jne 0x435b4d
mov eax, dword [ebp - 0x5c]
add dword [ebp - 0x4c], ecx
add dword [ebp - 0x3c], eax
mov esi, edi
cmp esi, dword [ebp - 0x40]
jl 0x435980
push dword [ebp - 0x38]
call fcn.0048bf45
mov dword [esp], 0x1b6
push 0x8301
push dword [ebp - 0x74]
call fcn.00481791
mov esi, eax
add esp, 0xc
test esi, esi
jl 0x435b54
push dword [ebp - 0x40]
push dword [ebp - 0x54]
push esi
call fcn.0048cefd
add esp, 0xc
cmp eax, dword [ebp - 0x40]
jne 0x435b54
push esi
call fcn.0048bf45
cmp eax, 0xffffffff
pop ecx
je 0x435b54
push dword [ebp - 0x54]
call fcn.0047e8b5
push dword [ebp - 0x44]
call fcn.0047e8b5
pop ecx
mov byte [ebp - 0x2d], 1
jmp 0x435b73
push str.loopread_patchfile_failed_n
jmp 0x435b6e
push str.loopread_error__Corrupt_patch_n
jmp 0x435b6e
push str.newposctrl_0__newsize__Corrupt_patch_n
jmp 0x435b6e
push str.offtdiff_bzdataend_n
jmp 0x435b6e
push str.lenread_ctrl_0___Corrupt_patch_n
jmp 0x435b6e
push str.newposctrl_1__newsize__Corrupt_patch_n
jmp 0x435b6e
push str.offtextra_extraend__Corrupt_patch_n
jmp 0x435b6e
push str.lenread_ctrl_1___Corrupt_patch_n
jmp 0x435b6e
push str.write_new_file_failed_n
jmp 0x435b6e
push str.open_oldfile_failed_n
jmp 0x435b6e
push str.bzctrllen_bzdatalen_or_newsize_is_wrong__Corrupt_patch_n
jmp 0x435b6e
push str.open_patchfile_failed_n
call fcn.00435b86
pop ecx
mov ecx, dword [ebp - 4]
mov al, byte [ebp - 0x2d]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0047b9fe
leave
ret