Function at 0x582550
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x1f4
mov eax, dword [0x610304]
xor eax, esp
mov dword [esp + 0x1f0], eax
mov eax, dword [esp + 0x1fc]
push ebx
push ebp
mov ebp, dword [esp + 0x208]
push esi
mov esi, dword [esp + 0x204]
lea ecx, [esp + 0xa0]
push edi
xor ebx, ebx
push ecx
mov dword [esp + 0x44], eax
mov dword [esp + 0x6c], ebp
mov dword [esp + 0x24], ebx
call fcn.0055b6e0
push 0x1f
push str.._third_party_bsdiff_create.cc
call fcn.00542a50
add esp, 0xc
cmp eax, 1
jl 0x5825dd
push 0xffffffffffffffff
push 0xcf
push str.._third_party_bsdiff_create.cc
lea ecx, [esp + 0x164]
mov dword [esp + 0x2c], 1
call fcn.005420d0
add eax, 4
push str.Start_bsdiff
push eax
call fcn.004701f0
add esp, 8
test byte [esp + 0x20], 1
je 0x5825f5
and dword [esp + 0x20], 0xfffffffe
lea ecx, [esp + 0x158]
call fcn.00542670
mov edx, dword [ebp + 4]
lea ecx, [esp + 0xb4]
mov dword [esp + 0x90], edx
call fcn.00579120
mov eax, dword [esp + 0xb4]
xor ecx, ecx
cmp ecx, eax
sbb ecx, ecx
lea edx, [esp + 0xb8]
and ecx, edx
mov dword [esp + 0x8c], ecx
mov ecx, 1
cmp ecx, eax
sbb ecx, ecx
lea edx, [esp + 0xc8]
and ecx, edx
mov dword [esp + 0xac], ecx
mov ecx, 2
cmp ecx, eax
sbb ecx, ecx
mov edi, dword [esi + 4]
lea edx, [esp + 0xd8]
and ecx, edx
mov dword [esp + 0x84], ecx
mov ecx, 3
cmp ecx, eax
sbb ecx, ecx
lea edx, [esp + 0xe8]
and ecx, edx
mov dword [esp + 0x70], ecx
mov ecx, 4
cmp ecx, eax
sbb ecx, ecx
lea edx, [esp + 0xf8]
and ecx, edx
mov dword [esp + 0x94], ecx
mov ecx, 5
cmp ecx, eax
sbb eax, eax
lea edx, [esp + 0x108]
and eax, edx
mov dword [esp + 0x98], eax
mov eax, dword [esi + 8]
sub edi, eax
lea esi, [edi + 1]
push esi
lea ecx, [esp + 0x14]
mov dword [esp + 0x38], eax
mov dword [esp + 0x64], edi
mov dword [esp + 0x60], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
call fcn.005824c0
test al, al
jne 0x58276c
call fcn.005416d0
cmp eax, 2
jg 0x582731
or dword [esp + 0x20], 2
push 2
push 0xe3
push str.._third_party_bsdiff_create.cc
lea ecx, [esp + 0x164]
call fcn.005420d0
push str._bytes
lea ecx, [edi*4 + 4]
push ecx
add eax, 4
push str.Could_not_allocate_I___
push eax
call fcn.004701f0
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_int_]
push eax
call fcn.004701f0
add esp, 8
test byte [esp + 0x20], 2
je 0x582744
lea ecx, [esp + 0x158]
call fcn.00542670
lea ecx, [esp + 0x18]
call fcn.005819e0
lea ecx, [esp + 0x10]
call fcn.005819e0
lea ecx, [esp + 0xb4]
call fcn.005791a0
mov eax, 1
jmp 0x582ff2
push esi
lea ecx, [esp + 0x1c]
call fcn.005824c0
test al, al
jne 0x5827da
call fcn.005416d0
cmp eax, 2
jg 0x5827d0
or dword [esp + 0x20], 4
push 2
push 0xe9
push str.._third_party_bsdiff_create.cc
lea ecx, [esp + 0x164]
call fcn.005420d0
push str._bytes
lea edx, [edi*4 + 4]
push edx
add eax, 4
push str.Could_not_allocate_V___
push eax
call fcn.004701f0
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_int_]
push eax
call fcn.004701f0
add esp, 8
test byte [esp + 0x20], 4
jmp 0x582736
lea eax, [esp + 0x9c]
push eax
call fcn.0055b6e0
mov edx, dword [esp + 0x38]
lea ecx, [esp + 0x1c]
push edi
push ecx
lea ebx, [esp + 0x1c]
call fcn.00581f60
push 0x1f
push str.._third_party_bsdiff_create.cc
call fcn.00542a50
add esp, 0x14
cmp eax, 1
jl 0x582881
or dword [esp + 0x20], 8
mov esi, dword [esp + 0x9c]
mov ebx, dword [esp + 0xa0]
lea edx, [esp + 0x7c]
push edx
call fcn.0055b6e0
mov ecx, dword [eax]
mov edx, dword [eax + 4]
add esp, 4
sub ecx, esi
push 0xffffffffffffffff
push 0xf0
sbb edx, ebx
mov dword [esp + 0x58], ecx
push str.._third_party_bsdiff_create.cc
lea ecx, [esp + 0x164]
mov dword [esp + 0x60], edx
call fcn.005420d0
lea ecx, [esp + 0x50]
mov esi, eax
call fcn.0056ed90
sub esp, 8
fstp qword [esp]
push str._done_qsufsort
add esi, 4
push esi
call fcn.004701f0
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___double_]
test byte [esp + 0x20], 8
je 0x582899
and dword [esp + 0x20], 0xfffffff7
lea ecx, [esp + 0x158]
call fcn.00542670
lea ecx, [esp + 0x18]
call fcn.005819e0
mov ecx, dword [esp + 0x40]
mov eax, dword [ecx + 8]
mov esi, dword [ecx + 4]
xor ebx, ebx
sub esi, eax
cmp esi, ebx
mov dword [esp + 0x44], eax
mov dword [esp + 0x4c], esi
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x74], ebx
mov dword [esp + 0x64], ebx
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x58], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x78], ebx
jle 0x582da5
add ebx, dword [esp + 0x78]
xor edi, edi
cmp ebx, dword [esp + 0x4c]
mov dword [esp + 0x3c], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x40], ebx
mov esi, ebx
jge 0x5829eb
mov ecx, dword [esp + 0x44]
lea eax, [ebx + ecx]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x4c]
sub eax, ebx
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x24]
sub eax, ecx
mov dword [esp + 0x50], eax
lea ecx, [ecx]
mov eax, dword [esp + 0x60]
mov edx, dword [esp + 0x38]
lea ecx, [esp + 0x3c]
push ecx
mov ecx, dword [esp + 0x2c]
push eax
push edx
mov edx, dword [esp + 0x40]
push ecx
push eax
push edx
lea eax, [esp + 0x28]
push eax
xor eax, eax
call fcn.005822c0
mov edi, eax
lea ebp, [edi + ebx]
add esp, 0x1c
cmp esi, ebp
mov dword [esp + 0x78], edi
jge 0x58298d
mov ecx, dword [esp + 0x44]
lea eax, [esi + ecx]
lea ecx, [ecx]
mov edx, dword [esp + 0x50]
add edx, eax
cmp edx, dword [esp + 0x60]
jge 0x582983
mov ecx, dword [esp + 0x24]
lea edx, [esi + ecx]
mov ecx, dword [esp + 0x34]
mov dl, byte [edx + ecx]
cmp dl, byte [eax]
jne 0x582983
add dword [esp + 0x2c], 1
add esi, 1
add eax, 1
cmp esi, ebp
jl 0x582960
mov ebp, dword [esp + 0x2c]
cmp edi, ebp
jne 0x582999
test edi, edi
jne 0x5829e7
lea eax, [ebp + 8]
cmp edi, eax
jg 0x5829e7
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x50]
lea edx, [eax + ecx]
cmp edx, dword [esp + 0x60]
jge 0x5829ca
mov ecx, dword [esp + 0x24]
lea edx, [ebx + ecx]
mov ecx, dword [esp + 0x34]
mov dl, byte [edx + ecx]
cmp dl, byte [eax]
jne 0x5829ca
sub ebp, 1
mov dword [esp + 0x2c], ebp
sub dword [esp + 0x38], 1
add ebx, 1
add eax, 1
cmp ebx, dword [esp + 0x4c]
mov dword [esp + 0x40], ebx
mov dword [esp + 0x28], eax
jl 0x582920
mov edi, dword [esp + 0x3c]
mov eax, dword [esp + 0x2c]
cmp dword [esp + 0x78], eax
jne 0x5829ff
cmp ebx, dword [esp + 0x4c]
jne 0x582d93
xor ebp, ebp
xor esi, esi
cmp ebx, dword [esp + 0x4c]
mov dword [esp + 0x24], ebp
jge 0x582a7f
mov ecx, dword [esp + 0x30]
mov eax, 1
add ecx, eax
cmp ebx, ecx
jl 0x582a7f
mov edx, dword [esp + 0x34]
lea ecx, [edi + edx - 1]
mov edx, dword [esp + 0x44]
mov dword [esp + 0x38], ecx
lea ecx, [ebx + edx - 1]
mov dword [esp + 0x50], esi
mov dword [esp + 0x28], ecx
cmp edi, eax
jl 0x582a7b
mov edx, dword [esp + 0x38]
mov cl, byte [edx]
mov edx, dword [esp + 0x28]
cmp cl, byte [edx]
jne 0x582a4d
add esi, 2
mov edx, dword [esp + 0x50]
mov ecx, esi
sub ecx, eax
sub edx, ebp
cmp ecx, edx
jle 0x582a61
mov dword [esp + 0x50], esi
mov ebp, eax
mov ecx, 1
sub dword [esp + 0x28], ecx
sub dword [esp + 0x38], ecx
add eax, ecx
mov ecx, dword [esp + 0x30]
lea edx, [eax + ecx]
cmp ebx, edx
jge 0x582a38
mov dword [esp + 0x24], ebp
xor ebp, ebp
xor eax, eax
cmp dword [esp + 0x30], ebx
jge 0x582af5
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x30]
xor esi, esi
sub ecx, dword [esp + 0x30]
mov dword [esp + 0x50], esi
mov dword [esp + 0x28], ecx
jmp 0x582aa5
mov ecx, dword [esp + 0x28]
add ecx, eax
add ecx, edx
cmp ecx, dword [esp + 0x60]
jge 0x582af5
mov edx, dword [esp + 0x30]
mov edi, dword [esp + 0x34]
lea ecx, [eax + edx]
mov edx, dword [esp + 0x58]
add edx, eax
mov dl, byte [edx + edi]
mov edi, dword [esp + 0x44]
cmp dl, byte [ecx + edi]
jne 0x582acf
add esi, 2
mov edx, dword [esp + 0x50]
add eax, 1
mov ecx, esi
sub ecx, eax
sub edx, ebp
cmp ecx, edx
jle 0x582ae6
mov dword [esp + 0x50], esi
mov ebp, eax
mov edx, dword [esp + 0x30]
mov edi, dword [esp + 0x3c]
lea ecx, [eax + edx]
cmp ecx, ebx
jl 0x582aa1
mov esi, dword [esp + 0x24]
mov edx, dword [esp + 0x30]
mov ecx, ebx
sub ecx, esi
lea eax, [edx + ebp]
cmp eax, ecx
jle 0x582bb8
mov eax, ebp
sub eax, ebx
add eax, esi
xor ebx, ebx
add eax, edx
cmp eax, ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x38], ebx
jle 0x582b9e
mov esi, dword [esp + 0x44]
mov edi, dword [esp + 0x30]
add ecx, esi
mov edx, ebp
sub edx, eax
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x3c]
sub ecx, dword [esp + 0x24]
add edi, edx
add ecx, dword [esp + 0x34]
add edi, esi
mov esi, dword [esp + 0x58]
add esi, edx
add esi, dword [esp + 0x34]
mov dl, byte [edi]
cmp dl, byte [esi]
jne 0x582b61
add dword [esp + 0x2c], 1
mov edx, dword [esp + 0x28]
mov dl, byte [edx]
cmp dl, byte [ecx]
jne 0x582b70
sub dword [esp + 0x2c], 1
mov edx, dword [esp + 0x50]
cmp dword [esp + 0x2c], edx
jle 0x582b89
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x50], edx
lea edx, [ebx + 1]
mov dword [esp + 0x38], edx
add dword [esp + 0x28], 1
add ebx, 1
add esi, 1
add edi, 1
add ecx, 1
cmp ebx, eax
jl 0x582b56
mov ecx, dword [esp + 0x38]
mov ebx, dword [esp + 0x40]
mov edi, dword [esp + 0x3c]
mov edx, ecx
sub edx, eax
add ebp, edx
sub dword [esp + 0x24], ecx
mov edx, dword [esp + 0x30]
xor esi, esi
test ebp, ebp
jle 0x582ccc
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x34]
lea edi, [edx + eax]
mov edx, dword [esp + 0x58]
add edx, ecx
mov dword [esp + 0x40], edx
jmp 0x582be0
mov al, byte [esi + edi]
mov ecx, dword [esp + 0x40]
sub al, byte [esi + ecx]
mov byte [esp + 0x4b], al
je 0x582cb4
mov edx, dword [esp + 0x5c]
mov ecx, dword [esp + 0x70]
add dword [esp + 0x64], 1
push edx
call fcn.00578f50
test al, al
je 0x58300b
mov ecx, dword [esp + 0x94]
push 1
lea eax, [esp + 0x4f]
push eax
mov dword [esp + 0x64], 0
call fcn.00578f40
test al, al
jne 0x582cb9
cmp dword [esp + 0x18], 0
je 0x582c75
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x582c60
mov ecx, dword [esp + 0x18]
sub eax, 1
mov dword [esp + 0x1c], eax
mov edx, dword [ecx + eax*4]
push edx
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
mov eax, dword [esp + 0x20]
add esp, 4
test eax, eax
jne 0x582c41
mov eax, dword [esp + 0x18]
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov dword [esp + 0x18], 0
cmp dword [esp + 0x10], 0
je 0x582756
mov eax, dword [esp + 0x14]
test eax, eax
je 0x58308f
lea esp, [esp]
mov ecx, dword [esp + 0x10]
sub eax, 1
mov dword [esp + 0x14], eax
mov edx, dword [ecx + eax*4]
push edx
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
mov eax, dword [esp + 0x18]
add esp, 4
test eax, eax
jne 0x582c90
jmp 0x58308f
add dword [esp + 0x5c], 1
add esi, 1
cmp esi, ebp
jl 0x582be0
mov edi, dword [esp + 0x3c]
mov edx, dword [esp + 0x30]
mov esi, ebx
sub esi, ebp
sub esi, dword [esp + 0x24]
mov dword [esp + 0x40], 0
sub esi, edx
test esi, esi
jle 0x582d1d
lea edi, [edx + ebp]
add edi, dword [esp + 0x44]
lea esp, [esp]
mov ecx, dword [esp + 0x98]
push 1
push edi
call fcn.00578f40
test al, al
je 0x5830ba
mov eax, dword [esp + 0x40]
add eax, 1
add edi, 1
cmp eax, esi
mov dword [esp + 0x40], eax
jl 0x582cf0
mov edi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x8c]
add dword [esp + 0x74], ebp
add dword [esp + 0x6c], esi
sub edi, ebp
sub edi, dword [esp + 0x24]
push ebp
sub edi, dword [esp + 0x5c]
call fcn.00578f50
test al, al
je 0x583144
mov ecx, dword [esp + 0xac]
push esi
call fcn.00578f50
test al, al
je 0x583144
mov ecx, dword [esp + 0x84]
push edi
call fcn.00578fb0
test al, al
je 0x583144
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x3c]
add dword [esp + 0x7c], 1
sub ecx, edx
mov eax, ebx
sub eax, edx
mov dword [esp + 0x58], ecx
sub ecx, eax
cmp ebx, dword [esp + 0x4c]
mov dword [esp + 0x30], eax
mov dword [esp + 0x24], ecx
jl 0x5828e0
mov edi, dword [esp + 0x60]
mov ebp, dword [esp + 0x68]
mov esi, dword [esp + 0x4c]
mov ecx, dword [esp + 0x5c]
push ecx
mov ecx, dword [esp + 0x74]
call fcn.00578f50
test al, al
je 0x582744
lea ecx, [esp + 0x10]
call fcn.005819e0
mov ecx, dword [esp + 0x34]
mov edx, dword [str.GBSDIF42]
mov eax, dword [0x5c847c]
push edi
push ecx
mov dword [esp + 0x1f4], edx
mov dword [esp + 0x1f8], eax
mov dword [esp + 0x1fc], edi
call fcn.005794c0
add esp, 8
push 8
lea edx, [esp + 0x1f0]
push edx
mov ecx, ebp
mov dword [esp + 0x200], eax
mov dword [esp + 0x204], esi
call fcn.00578f40
mov bl, al
mov eax, dword [esp + 0x1f4]
push eax
mov ecx, ebp
call fcn.00578f50
mov ecx, dword [esp + 0x1f8]
push ecx
mov ecx, ebp
and bl, al
call fcn.00578f50
mov edx, dword [esp + 0x1fc]
push edx
mov ecx, ebp
and bl, al
call fcn.00578f50
test bl, al
je 0x582744
mov eax, dword [esp + 0x70]
mov ecx, dword [eax + 4]
mov dword [esp + 0x68], ecx
push ebp
lea ecx, [esp + 0xb8]
call fcn.005791e0
test al, al
je 0x582744
push 0x1f
push str.._third_party_bsdiff_create.cc
call fcn.00542a50
add esp, 8
cmp eax, 1
jl 0x582fbf
or dword [esp + 0x20], 0x10
mov esi, dword [esp + 0xa4]
mov ebx, dword [esp + 0xa8]
lea edx, [esp + 0xac]
push edx
call fcn.0055b6e0
mov ecx, dword [eax]
mov edx, dword [eax + 4]
add esp, 4
sub ecx, esi
mov esi, dword [ebp + 4]
push 0xffffffffffffffff
push 0x1b9
sbb edx, ebx
mov dword [esp + 0x8c], ecx
push str.._third_party_bsdiff_create.cc
lea ecx, [esp + 0x164]
mov dword [esp + 0x94], edx
call fcn.005420d0
lea ecx, [esp + 0x84]
mov edi, eax
call fcn.0056ed90
sub esi, dword [esp + 0x90]
mov eax, dword [esp + 0x6c]
mov ecx, dword [esp + 0x68]
mov edx, dword [esp + 0x64]
sub esp, 8
fstp qword [esp]
push str._nEnd_bsdiff
push esi
push str._nUncompressed_bsdiff_patch_size
push eax
mov eax, dword [esp + 0x8c]
push str.__extra_bytes:
push 0x5a84cc
push ecx
mov ecx, dword [esp + 0xa0]
push str.___skips:
push edx
push str.__mistakes:
push eax
push str.__copy_bytes:
push ecx
push str.Control_tuples:
add edi, 4
push edi
call fcn.004701f0
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___int_]
push eax
call fcn.004701f0
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___int_]
push eax
call fcn.004701f0
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___int_]
push eax
call fcn.004701f0
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_int_]
push eax
call fcn.004701f0
add esp, 8
push eax
call fcn.004701f0
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___int_]
push eax
call fcn.004701f0
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_int_]
push eax
call fcn.004701f0
add esp, 8
mov ecx, eax
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___double_]
test byte [esp + 0x20], 0x10
je 0x582fd2
lea ecx, [esp + 0x158]
call fcn.00542670
lea ecx, [esp + 0x18]
call fcn.005819e0
lea ecx, [esp + 0x10]
call fcn.005819e0
lea ecx, [esp + 0xb4]
call fcn.005791a0
xor eax, eax
mov ecx, dword [esp + 0x200]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00584870
add esp, 0x1f4
ret
cmp dword [esp + 0x18], 0
je 0x583054
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x58303f
lea ebx, [ebx]
mov ecx, dword [esp + 0x18]
sub eax, 1
mov dword [esp + 0x1c], eax
mov edx, dword [ecx + eax*4]
push edx
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
mov eax, dword [esp + 0x20]
add esp, 4
test eax, eax
jne 0x583020
mov eax, dword [esp + 0x18]
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov dword [esp + 0x18], 0
cmp dword [esp + 0x10], 0
je 0x582756
mov eax, dword [esp + 0x14]
test eax, eax
je 0x58308f
jmp 0x583070
mov ecx, dword [esp + 0x10]
sub eax, 1
mov dword [esp + 0x14], eax
mov edx, dword [ecx + eax*4]
push edx
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
mov eax, dword [esp + 0x18]
add esp, 4
test eax, eax
jne 0x583070
mov eax, dword [esp + 0x10]
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
lea ecx, [esp + 0xb4]
mov dword [esp + 0x10], 0
call fcn.005791a0
mov eax, 1
jmp 0x582ff2
cmp dword [esp + 0x18], 0
je 0x583104
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x5830ef
lea esp, [esp]
mov ecx, dword [esp + 0x18]
sub eax, 1
mov dword [esp + 0x1c], eax
mov edx, dword [ecx + eax*4]
push edx
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
mov eax, dword [esp + 0x20]
add esp, 4
test eax, eax
jne 0x5830d0
mov eax, dword [esp + 0x18]
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov dword [esp + 0x18], 0
cmp dword [esp + 0x10], 0
je 0x582756
mov eax, dword [esp + 0x14]
test eax, eax
je 0x58308f
jmp 0x583120
mov ecx, dword [esp + 0x10]
sub eax, 1
mov dword [esp + 0x14], eax
mov edx, dword [ecx + eax*4]
push edx
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
mov eax, dword [esp + 0x18]
add esp, 4
test eax, eax
jne 0x583120
jmp 0x58308f
cmp dword [esp + 0x18], 0
je 0x583187
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x583172
mov ecx, dword [esp + 0x18]
sub eax, 1
mov dword [esp + 0x1c], eax
mov edx, dword [ecx + eax*4]
push edx
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
mov eax, dword [esp + 0x20]
add esp, 4
test eax, eax
jne 0x583153
mov eax, dword [esp + 0x18]
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 4
mov dword [esp + 0x18], 0
cmp dword [esp + 0x10], 0
je 0x582756
mov eax, dword [esp + 0x14]
test eax, eax
je 0x58308f
mov edi, edi
mov ecx, dword [esp + 0x10]
sub eax, 1
mov dword [esp + 0x14], eax
mov edx, dword [ecx + eax*4]
push edx
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
mov eax, dword [esp + 0x18]
add esp, 4
test eax, eax
jne 0x5831a0
jmp 0x58308f